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 happens when we move a comp-3 field to an edited (say z (9). Zz-)?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
how do you define single dimensional array and multidimensional array in your cobol?
For rewrite, why is it mandatory that file needs to be opened?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
What the difference is between continue and next sentence?
What type of SDLC u followed? Why?
How do get the result of your program directly on your pc?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
What is the difference between next sentence and continue in cobol programing language?
Write a program to enter and display the names of students in a class using the occurs clause.
What is link edit in cobol?
What is Pic 9v99 Indicates in COBOL?
What is the difference between perform … with test after and perform … with test before?
What is the difference between a binary search and a sequential search what are the pertinent cobol?