Consider the following:

77 W-NUM PIC 9 VALUE 0
------
MOVE 1 TO W-NUM
PERFORM PARA-X UNTIL W-NUM > 9.
------
PARA-X
ADD 1 TO W-NUM

How many times PARA-X is executed ?

Answers were Sorted based on User's Feedback



Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM ..

Answer / guna

9 times.
Initially, W-Num value will be 1.
1>9, so para will be executed. - 1 time
2>9, so para will be executed. - 2 times
3>9, so para will be executed. - 3 times
4>9, so para will be executed. - 4 times
5>9, so para will be executed. - 5 times
6>9, so para will be executed. - 6 times
7>9, so para will be executed. - 7 times
8>9, so para will be executed. - 8 times
9>9, so para will be executed. - 9 times
10>9, so para will not be executed

so para is executed for 9 times.

Is This Answer Correct ?    7 Yes 9 No

Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM ..

Answer / satish29

Infinite loop because w-num value does not change.

Is This Answer Correct ?    2 Yes 5 No

Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM ..

Answer / ajith

9

Is This Answer Correct ?    2 Yes 5 No

Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM ..

Answer / ram.g

9 is the correct ans

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More COBOL Interview Questions

i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?

12 Answers  


hi friends,can any one post the ibm mainframe inteqview questions for 1year exp candidate,for itc infotech interview?. have any body attended for this in the past?...

1 Answers   ITC Infotech,


What is the LINKAGE SECTION used in COBOL?

0 Answers   UGC Corporation,


what are difference organizations in cobol and access mode in cobol? can you expalin what organization means while declaring for ksds,esds,rrds?

1 Answers   HCL,


what will happen if i give program name and member name as different? program runs successful or w'll abend?

5 Answers   CTS,






What is the local-storage section?

0 Answers  


What will happen if we try to create GDG (+2) generaton instead of (+1) generation?

1 Answers  


What is an in-line perform ?

4 Answers   Accenture,


how to transfer the file from pc to mainframe??

4 Answers  


have in 100 records in a flat file i want to move records like 1,3,5,7,9,11,.. to Output file1 and 2,4,6,8,10,12,14 .. records moved to Output file2..Pls Provide real time answer..

5 Answers   TCS,


What do you do to resolve SOC-7 error?

2 Answers   Sun Life, Wipro,


how many divisions are there in cobol

3 Answers   ADP,


Categories