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


Please Help Members By Posting Answers For Below Questions

What is amode(31)

712


Write a program that uses move corresponding.

664


What are the different rules of SORT operation?

689


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2091


What is the Purpose of POINTER Phrase in STRING command in COBOL?

711






Write a cobol program making use of the redefine clause.

721


What are declaratives and what are their uses in cobol?

701


What is the difference between PIC 9.99 and 9v99 in COBOL?

727


Write the code to count the sum of n natural numbers.

696


How to print 10 to 1 if the input have only 10 digit number?

803


What is the difference between structured cobol programming and object alternativelyiented cobol?

746


What are the different data types in cobol?

781


How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?

696


Difference between array and sub-script ?

1154


Discuss about changing dataset name in proc.

757