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
State the various causes of s0c1, s0c5 and s0c7.
how do you reference the esds vsam file formats from cobol programs
example for sub strings ? and refernce modifications whit output pls
What is link edit in cobol?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What is the problem of ordered sequential files access?
How many bytes S(8) comp field occupy and its maximum value?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What is a scope terminator give example?
How do u write test cases?
What are the access modes of START statement?
Discuss about changing dataset name in proc.
What is the difference between next sentence and continue in cobol programing language?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
What is rmode(24)