Wat is the difference between NEXT and CONTINUE statement in
cobol,can any one explain with example.
Answer Posted / satish k
Explanation for Next sentence:
sol:
code:
If A>B
next sentence
end-if
display 1
display 2.
display 3.
So, over here the output is no doubt 3 provided A>B id true.
well, but it works is, the next sentence will always search
for the next executable sentence in the flow.
Here, the next executable sentence was display 3.so, it
executes and gives output as 3.
Explanation for Continue:
code:
if a>b
continue
end-if
display 1
display 2.
display 3.
Here in Continue statement, it is just like 'do nothing'.
so, it will executes all the display statements.
| Is This Answer Correct ? | 37 Yes | 3 No |
Post New Answer View All Answers
What is an in line perform? When would you use it? Anything else you wish to say about it.
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
How to remove 2 duplicate records and copy only one using job control language?
How are the next sentence and continue different from each other?
What is rmode(24)
What are literals?
What guidelines should be followed to write a structured cobol prgm?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
What is the difference between PIC 9.99 and 9v99 in COBOL?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What are the various section in data division and briefly explain them.
How do define dynamic array in cobol.
What is a scope terminator give example?
How many sections are there in data division in COBOL?
What is a report item?