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
how do you reference the variable unblock file formats from cobol programs
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
what is s000 u4087 error? please give the all error codes in cobol,jcl.
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
What are different data types in cobol?
HOw can I get the negative sign while deduct high value from low value
what is the use of outrecord?
Can we redefine the field of x(200) to less than 200?
How do you reference the fixed block file formats from cobol programs
what is difference between cobol and cobol/400
Write a program to enter and display the names of students in a class using the occurs clause.
What is length is cobol?
) what is the difference between AID and HANDLE AID?
Why did you choose to work with ibm mainframe cobol programming?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks