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



Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through ..

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

Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through ..

Answer / rkt

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

Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through ..

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

Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through ..

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

Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through ..

Answer / dimpy19

Compilation Error.
both NEXT SENTENCE and CONTINUE place holder.
above situation NEXT SENTENCE will give compilation error
CONTINUE will not generate compilation error

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

Write a program to enter and display the names of students in a class using the occurs clause.

0 Answers  


Explain complete concept of table handling in COBOL with an example?

2 Answers   IBM, TCS, Wipro,


1)what is the maximum limit for occurs? Eg: 01 A PIC X(10) OCCURS N TIME. What is the max value for N?

11 Answers   Wipro,


What are some examples of command terminators?

1 Answers  


IF there 5 to 6 files in a JCL and there is some space abends, how can we identify which file has space abend and what can be done to get off that abend or rectify that abend.

2 Answers   ADNA, CSC,






COMP field occupy ?

2 Answers  


Can printer files (having 133 characters) be of variable length?

3 Answers  


What type of SDLC u followed? Why?

0 Answers   IBM,


How many sections are there in data division?.

10 Answers   Amdocs, TCS,


Can anyone please give the example of Inline Perform.

6 Answers   TCS,


level number 77 is used to define a)group data b)elementary data c)redefine d)none

8 Answers   TCS,


What are decleratives in COBOL ?

1 Answers   Xansa,


Categories