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
) what is the difference between AID and HANDLE AID?
what is amode(24), amode(31), rmode(24) and rmode(any)?
Name the sections present in data division.
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
how do you reference the printer file formats from cobol programs
IF I mention stop run in CICS what happens?
Write a cobol program making use of the redefine clause.
Mention the guidelines to write a structured cobol program?
How do u write test cases?
Write some characteristics of cobol as means of business language.
how do you reference the ksds vsam file formats from cobol programs
How do you define a variable of comp-1 and comp-2?
What is cobol?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
Explain about different table spaces.