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
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 |
Answer / satish29
Infinite loop because w-num value does not change.
Is This Answer Correct ? | 2 Yes | 5 No |
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?
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?...
What is the LINKAGE SECTION used in COBOL?
what are difference organizations in cobol and access mode in cobol? can you expalin what organization means while declaring for ksds,esds,rrds?
what will happen if i give program name and member name as different? program runs successful or w'll abend?
What is the local-storage section?
What will happen if we try to create GDG (+2) generaton instead of (+1) generation?
What is an in-line perform ?
how to transfer the file from pc to mainframe??
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..
What do you do to resolve SOC-7 error?
how many divisions are there in cobol