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 / mr.perfect
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, this will go to 0 because , the PIC at WOrking
storage section is 9. so that 10 becomes 0
W-NNum = 0 . THe loop again start from 0> 9
this will execute Infinite loop.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Describe the cobol database components?
Are you comfortable in cobol or jcl?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How do you reference the following file formats from cobol programs?
What is cobol?
Which is not true about evaluate statement
) what is the difference between AID and HANDLE AID?
what is amode(24), amode(31), rmode(24) and rmode(any)?
Write the code to count the sum of n natural numbers.
What is length is cobol?
What are all the divisions of a COBOL program?
Write the code implementing the perform … varying.
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
Explain about different table spaces.