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


Please Help Members By Posting Answers For Below Questions

System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1588


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

894


Give some examples of command terminators?

755


Which mode is used to operate the sequential file?

660


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

700






How can you get the ksds file records into your cobol program?

642


What is the difference between Global and External Variables?

666


What is the difference between PIC 9.99 and PIC9v99?

778


What is inspect in cobol ?

801


Write some characteristics of cobol as means of business language.

619


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

748


How do u write test cases?

1633


Write down the divisions of cobol program?

669


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

932


Why did you choose to work with ibm mainframe cobol programming?

629