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 ?
Answer Posted / 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 |
Post New Answer View All Answers
When is inspect verb is used in cobol?
What is the local-storage section?
What is comp-1 and comp-2?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
Can you please let me know the centre name of INS certification in Kolkata.
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What are various search techniques in cobol? Explain.
What are the cobol coding sheets?
) how do u code after getting data?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning