How many times the loop runs here
01 a pic 9(2) value 10.
perform para1 a times
stop run.
para1:
move 20 to a.

Answers were Sorted based on User's Feedback



How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1:..

Answer / suresh

it performs 10 times only it donot change while looping

Is This Answer Correct ?    14 Yes 3 No

How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1:..

Answer / shiva

initally a=10
perfrm para1 a(10) times
move 20 to a...so now a=20

now again perform para1 a(20)times
and loop goes on
hence infinite loop

Is This Answer Correct ?    3 Yes 5 No

How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1:..

Answer / guest

infinite loop

Is This Answer Correct ?    5 Yes 12 No

Post New Answer

More COBOL Interview Questions

Can we access the a[0] in the array ?

6 Answers   DCL, IBM,


What are differences between COBOL and java ? why we are giving more preference to COBOL ?

3 Answers   TCS,


Describe the cobol database components?

0 Answers  


What rules are followed by the search verb.

0 Answers  


What is a subscript ?

3 Answers  






What does the initialize statement do ?

2 Answers  


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

0 Answers   IBM,


I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?

5 Answers   Cognizant,


i Want All cobol ERROR codes?

4 Answers   HCL, IBM,


if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.

1 Answers   IBM,


soc-7 is a bad data,invalid data. when ever we are moving the alphabets in the position of numeric then we got this abend. so my question is if o1 ws-data pic 9(1) value passing the alphabet some x. then we got soc-7 or not? i want clarification ?

7 Answers   CitiGroup, IBM,


SIGN TRAILING SEPARATE field occupy ?

3 Answers  


Categories