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

subscript and index r not coded in u r application program what will happen?

2 Answers  


When and how can we use index & subscript ?

2 Answers  


What is COMP SYNC?

3 Answers  


How to open and see copy book ?

3 Answers  


diffrence between renames and redifnes with examples

3 Answers   IBM,






Can printer files (having 133 characters) be of variable length?

3 Answers  


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

0 Answers   Steria,


How to remove 2 duplicate records and copy only one using job control language?

0 Answers  


How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?

1 Answers  


Can we move X(9) to 9(9). If yes what are the ways for doing this?

3 Answers  


How do you reference the fixed block file formats from cobol programs

0 Answers  


If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the result in subprogram ,Is it possible ?If yes please tell me the reason.

1 Answers  


Categories