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

Describe the difference between subscripting and indexing ?

2 Answers  


consider the following PROCEDURE DIVISION entry OPEN EXTEND IN-FILE identify the correct statement a.organization of IN-FILE is sequential and records can be added in the beginning b.organization of IN-FILE is sequential and records can be added in the end c.organization of IN-FILE is indexed and records can be added in the beginning d.organization of IN-FILE is indexed and records can be added in the end

3 Answers   TCS,


how will u find out 3rd week's 2nd day using occurs ?

3 Answers   L&T,


If we use GO BACK instead of STOP RUN in cobol?

1 Answers   Temenos,


What is Static and Dynamic linking ?

3 Answers  






consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable

10 Answers   TCS,


soc-7 is a bad data,invalid data. when ever we are moving the alphabets in the position of numeric then we got this abend. so my question is if o1 ws-data pic 9(1) value passing the alphabet some x. then we got soc-7 or not? i want clarification ?

7 Answers   CitiGroup, IBM,


how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $

4 Answers  


is it possible to declare index in cobol program? if it is not why its tell me pls

3 Answers  


File status must be checked both while opening and reading the file or only while reading the file?

2 Answers  


) how do u code after getting data?

0 Answers   IBM,


Categories