COBOL Snippet: Tell where the control will when the below
code execute

IF (A=B)
CONTINUE
ELSE
NEXT SENTENCE
PERFORM <IMP-STMT>
END-IF.

Answers were Sorted based on User's Feedback



COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE E..

Answer / lu

First of all, when you code , you have to know what do you
want to do....
Perform after next sentence doesn't make sense ..it never
executes....

Is This Answer Correct ?    9 Yes 2 No

COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE E..

Answer / manj

CONTINUE inside IF loop searches for the first terminator
END-IF and comes out.

NEXT SENTENCE searches for the first FULL STOP and goes to
the next line after that.

The above code does nothing. IF A=B, control comes to the
next line after END-IF and same for ELSE part too.

Is This Answer Correct ?    5 Yes 0 No

COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE E..

Answer / hitesh karnani

First of all, when you code , you have to know what do you
want to do....
Perform after next sentence doesn't make sense ..it never
executes....

Is This Answer Correct ?    1 Yes 2 No

COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE E..

Answer / meg

Lu is very correct no body code like
NEXT SENTENCE
PERFORM <IMP-STMT>
this

Is This Answer Correct ?    0 Yes 2 No

COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE E..

Answer / chandrababu naidu

if both values A and B values are equal, then control go to
'perform' statement, if both values A and B values are not
equal then control come out of if condition.

Is This Answer Correct ?    3 Yes 5 No

COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE E..

Answer / venkat

First of all u have to know the standards and basic things.
If u don't just leave. Other one can answer for this ques.

Is This Answer Correct ?    0 Yes 5 No

COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE E..

Answer / niveditha

This code looks funny.but still some times it is useful. If
A=B the control will be start immediately from after end-if.
If A not = B then perform loop will executes. there is no
meaning of next sentence

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More COBOL Interview Questions

Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.

12 Answers  


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

1 Answers   L&T,


When we code these comp,comp1,comp-2,comp-3 and comp4 values. I know the differnece.I mean when we will prefer if it is new program.Explain in detail with memory examples. Thanks in advance.

1 Answers   CTS,


When would you use in-line perform?

2 Answers  


How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree

3 Answers   Merrill Lynch,






What is the default value of DISP parameter?

3 Answers   IBM,


In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference

3 Answers   IBM,


What is an in-line perform ?

4 Answers   Accenture,


What is the problem of ordered sequential files access?

0 Answers  


what happens of we dont give time stamp in precompilation process

2 Answers  


why we are using set in searchall?

4 Answers   IBM,


Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

2 Answers   IBM,


Categories