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 |
What is difference between comp & comp-4?
What is cobol?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
how to check whether the open command of a sequential file is successful? or not?
Explain fixed length record in cobol? with suitable example
how to pass 100 to s9(4) how r they inserted ?
give the examples of strings in cobol
what is subscript in cobol?give realtime example?
waht is inspect verb? where it can be in real time?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
what are the limitations of Inline Perform?
how to submit a jcl by cobol program. clear me with an example.