IDENTIFICATION DIVISION.
PROGRAM-ID. MOVEPGM.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-I PIC 9(2).
PROCEDURE DIVISION.
A1000-MAIN-PARA.
PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5
STOP RUN.
PARA-X.
DISPLAY "BEST2".
I m getting error s722,while executing the program, seems
getting in loop, can anybody tell me why
Answers were Sorted based on User's Feedback
Answer / anand
WS-I should be initialized before calling the para PARA-X
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / shekhar
initialize with a value and increase & decrease accordingly.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / billyboyo
In IBM Cobol.
You need to give WS-I a starting value and increment it (or
decrement it, depending on the value) either in the perform
construct or in the paragraph.
You should consider the PICTURE and USAGE of WS-I. Much
better as PIC S9(4) and COMP.
You are also using a compile option, probably NUMPROC
(NOPFD) which is preventing your program abending by
doing "sign fixing". Only use NOPFD is all your data is
good, otherwise it makes errors harder to find.
| Is This Answer Correct ? | 0 Yes | 0 No |
What will happen if we generate GDG (+2) version without generating (+1) version?
how to refer the data field?
I have a variable account-number declared as comp-3, s9(10) comp-3 in a file. How do i find a particular account number say 123456 in that file?
In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?
What is the difference between a subscript and an index in a table definition?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)
If i got a job on mainframe technology, will i have a bright future?. Some people are discouraging me. Let me know, is it true? Please bring back me from the confusion.
How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.
What is normalisation?
How do pass the values to the parameters in cobol
Name the sections present in data division.