Wat is the difference between NEXT and CONTINUE statement in
cobol,can any one explain with example.
Answer Posted / murali
Answer #9 would never compile in the first place. We cannot
have and END-IF. after an END-IF. without an IF statement.
The ANSI-85 specifically flags that NEXT SENTENCE within IF
ELSE END-IF Block.
In the example provided in #4
If A>B
next sentence
end-if
display 1
display 2.
display 3.
when A>B is true Display 3 will be executed and if not
display 1 display 2 display 3 will be executed. This means
that we want to display 1 and display 2 to be executed in
when A > B is false. In such cases it should be coded in the
else portion of the code. When display 1 and display 2
should be executed irrespective of the test condition, then
the next sentence needs to be replaced with continue.
Avoid coding a next sentence within if - else - end-if blocks.
Very simple.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why would you use find and get rather than to obtain?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What is the Purpose of Pointer in the string?
i need a small 3d program using inline and outline.
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
How do define dynamic array in cobol.
What is the difference between external and global variables in COBOL?
Write a cobol program making use of the redefine clause.
Which division and paragraphs are mandatory for a COBOL program?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
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.
Which is not true about evaluate statement
What is the difference between PIC 9.99 and PIC9v99?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What are the different types of condition in cobol and write their forms.