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

How you can read the file from bottom?

0 Answers  


how will you define vsam file in select clause?

3 Answers   Patni,


what happens if we dont close cursor in db2-cobol pgm?

6 Answers  


I have a File that has duplicate records. I need only those records that occur more than thrice.?

3 Answers   IBM, Wipro,


Suppose, file A has 100 records and file B has 500 records. We want to write records common to both A and B into file C and records which are present only in either A or B into another file D. What should be the logic of Cobol program to achieve this?

7 Answers   Bank Of America, Mind Tree,






what happens if parmparameter passes zero bytes to the program

0 Answers   HSBC,


why occurs clause not mentioned in 01 level

6 Answers   HCL, NIIT, TCS, Tesco,


What is the Importance of GLOBAL clause According to new standards of COBOL?

2 Answers   Infosys,


what are the control characters used in reports

1 Answers  


How do pass the values to the parameters in cobol

2 Answers  


How to convert bunch of words in a line to relvant ASCII values?

2 Answers  


In the JCL, how do you define the files referred to in a subroutine ?

2 Answers  


Categories