Consider the below example

call a-test1.
--
--
--
a-test1.
if a=b
perform a-test through a-exit
next sentence
else
if b=c
perform c-test through c-exit.
if a=d
perform d-test through d-exit.
a-test.
--
--
a-exit.
exit.

can u tell me what will happen if a=b
after looping into a-exit will the control go back to a-
test1.

will the condition a=d be checked???

Answer Posted / adarsha

NOP ! none of the above.. compiler Error !!!

When you are using NEXT SENTENCE or continue, their
shouldn't be any sentence/paragraph name or anything before
or after it with in that condition...

if a=b
NEXT SENTENCE
.
.
. should be the syntax ... perform a-test through a-exit
shouldn't be coded 1


hope it helps u !

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What kind of error is trapped by on size error option?

950


i want a program using by if, evaluate , string, unstring, perform, occurs?

4341


How to use the same COBOL program in Batch and CICS on lines? explain with an example

2101


What is the usage of comp fields in cobol?

869


What are the different open modes available in cobol?

933


what are decleratives in cobol?

1994


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 ?

2088


What is cobol?

943


What is the difference between comp and comp-3 usage?

861


Mention the guidelines to write a structured cobol program?

820


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

862


What are declaratives and what are their uses in cobol?

928


In COBOL programming, what is PERFORM? What is VARYING?

866


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

2232


Why occurs cannot be used in 01 level in COBOL?

910