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 |
I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??
What are ISOLATION LEVELS? Where do we need to specify them?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
Name the sections present in data division.
How to convert bunch of words in a line to relvant ASCII values?
how many bytes do SPPPP999 will store?
Which Search verb is equivalent to PERFORM…VARYING?
How are the next sentence and continue different from each other?
How do you define a table/array in COBOL?
for an INITIALIZE and what keyword allows for an override of the default.
How arrays can be defined in COBOL?
How is sign stored in Packed Decimal fields and Zoned Decimal fields?