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???
Answers were Sorted based on User's Feedback
Answer / uday
if a=b the loop will be executed(a-test) and then control will
comeback to the loop.here next sentence is used thats why the
control is going to execute statements after end-if ,if any.
| Is This Answer Correct ? | 6 Yes | 0 No |
Hi,
If a=b then para a-test will be performed from a-test to
a-exit , once it will be completed the control will returns
back to perform statement at line number 7 then the next
sentence statement will be executed. when next sentence will
be executed the control will look for a period (.) if it
finds then it will execute just after line of the para. here
it is if a=d , So the control will check for the condition
a=d and if its true then will perform d-test through d-exit.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / 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 |
Answer / khasim
compile error.
d-test and d-exit. not defined in Procedure division.
if we code the d-test and d-exit.
control goes to d-exit. not goback to a-test1.
after d-exit, it will go back.
| Is This Answer Correct ? | 1 Yes | 0 No |
what is search and searchall?what is the diffrence between them?give an best example?
What is the linkage section?
What is redefines clause in COBOL?
Explain how you can characterize tables in cobol?
Wat is the difference between NEXT and CONTINUE statement in cobol,can any one explain with example.
What rules are to be followed while using the corresponding options?
Hi , I am posting some questons which are asked at interview. These may help u for ur interview... what is static and dynamic call?
Read filea And file b write the same records in both files? Records in a but not in b record in b but not in a
If we use GO BACK instead of STOP RUN in cobol?
Name some of the examples of COBOl 11?
I have two sequential files, FILE-1 and FILE-2. FILE-1 contains 2 columns(A,B) and FILE-2 contains 3 columns (C,D,E).I want an output file, FILE-3 which has all five columns with duplicates eliminated from column A.
What is the difference between index and subscript?