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 / gaurav
Rahul's answer is correct.
Please note that the W-NUM is defined as PIC 9, hence it
can contain only a single digit numberic number i.e from
number 0 to number 9. Thus when the PARA-X is executed 9
times when W-NUM contains 9. It will not be able to add
further 1 to W-NUM, thus it will go in a infinite loop.
Hope this clear things.
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Write a program that uses move corresponding.
What is comp-1 and comp-2?
In which area will you utilize 88 level items in cobol?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Describe the cobol database components?
What is difference between static and dynamic call in cobol?
What is the difference between Global and External Variables?
i need a small 3d program using inline and outline.
What is the problem of ordered sequential files access?
how do you reference the variable unblock file formats from cobol programs
how do you reference the printer file formats from cobol programs
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
How to know whether the module is dynamical or statistical?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there