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
Answer Posted / 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 |
Post New Answer View All Answers
What is the difference between PIC 9.99 and 9v99 in COBOL?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
What is cobol?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
what is difference between cobol and cobol/400
Describe the cobol database components?
What is the compute verb? How is it used?
What are all the divisions of a COBOL program?
Write the code to count the sum of n natural numbers.
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
What is redefines clause in COBOL?
Which division and paragraphs are mandatory for a COBOL program?
How do you reference the fixed block file formats from cobol programs
Mention the guidelines to write a structured cobol program?