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

Answers were Sorted based on User's Feedback



How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. ..

Answer / priyanka

Para1 would be executed 1 time. after 1st time the value of
a is 10 and it comes out of loop.

it move 1 to a and stop execution.

Is This Answer Correct ?    23 Yes 0 No

How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. ..

Answer / guest

1 time

Is This Answer Correct ?    15 Yes 2 No

How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. ..

Answer / vikas

Just once. The 'move 1 to a' is not in the para1. So its is NOT infinite loop.

Is This Answer Correct ?    0 Yes 0 No

How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. ..

Answer / harish

It depends on two coditions with PERFORM WITH TEST BEFORE/AFTER.

Is This Answer Correct ?    0 Yes 0 No

How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. ..

Answer / vinod

it dirctly move 10 to a when perform para1 until a=10
after that it moves to the para the condition is checked
and pass the a value to 10.
again the perform is check the condion its true move the
value to 1.agin it passes the same so it is a infinite loop.

Is This Answer Correct ?    3 Yes 23 No

Post New Answer

More COBOL Interview Questions

How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

2 Answers   IBM, Wipro,


I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?

1 Answers  


What should be the sorting order for SEARCH ALL?

5 Answers  


How to read the last 100 records from a COBOL file. The file contains N number of records.

11 Answers   IBM,


What is the point of the REPLACING option of a copy statement?

3 Answers  






What is Alternate Index ? How is it different from regular index ?

2 Answers  


which of the following can be used as a check protection symbol a.Z b.S c.* d.+

2 Answers   TCS,


what are the diferences b/w sub-script and index?

4 Answers  


TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr

1 Answers   MNC,


What is comp-1 and comp-2?

0 Answers  


What is the default value of DISP for temp datasets

5 Answers   IBM,


how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


Categories