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



IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. ..

Answer / anand

WS-I should be initialized before calling the para PARA-X

Is This Answer Correct ?    4 Yes 1 No

IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. ..

Answer / shekhar

initialize with a value and increase & decrease accordingly.

Is This Answer Correct ?    1 Yes 1 No

IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. ..

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

Post New Answer

More COBOL Interview Questions

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

0 Answers   SwanSoft Technologies,


What is mean by maxcc

7 Answers   Syntel,


I have two files , file1 is input file it contains 10,20,30,....,records but i want to display the records in file 2 as reverse order .how can we do by using jcl& cobol(dont use array) please any one can tell me the answer

3 Answers   GreenTree, IBM,


wht do u mean by (*,intrdr) wht is * used for ?

2 Answers  


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

0 Answers  






how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

0 Answers   Valtech,


How do define Dymanic array in cobol how do u define single demensional arry and multidymensional arry in ur cobol.

4 Answers   Cap Gemini,


Study the DATA DIVISION entries and the three PROCEDURE DIVISION entries given below: 01 END-OF-FILE-SWITCH PIC XXX. 88 NO-MORE-RECS VALUE "YES". 88 MORE-RECS VALUE "NO". (i) READ SAMPLE-FILE AT END MOVE "YES" TO NO-MORE-RECS. (ii) IF NO-MORE-RECS = "YES" GO TO LAST-PARA. (iii) IF NO-MORE-RECS GO TO LAST-PARA. Which are wrong? (a) (i) and (ii) (b) (ii) and (iii) (c) (i) and (iii) (d) all

5 Answers   TCS,


what is the difference between perform varying and perform until

4 Answers   TCS,


why 02 level number can't be use as a separate level number like 01 or 77 ?

3 Answers  


Whtz the specialty of 77 level number ?

2 Answers   Infosys,


01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?

6 Answers   L&T,


Categories