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

for an INITIALIZE and what keyword allows for an override of the default.

2 Answers  


What is the difference between index and subscript?

5 Answers   Visa,


S9(5)V9(2) occupies how many bytes memory ?

6 Answers   Cap Gemini,


ZEROES and SPACES are _______ constants (a) Figurative (b) Numeric (c) Non-numeric (d) Alphabete

4 Answers   TCS,


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

1 Answers   Syntel,


Are you comfortable in cobol or jcl?

0 Answers  


77 I pic 99 value 5 Perorm para-A I times. Para -A. move 10 to I. How many times the para-A will be executed.?

9 Answers   TCS,


What is the difference between SEARCH and SEARCH ALL? What is more efficient?

9 Answers   IBM, iFlex, Wipro,


What is EIBCALEN? Why it is used?

9 Answers   ADP,


Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be

7 Answers   TCS,


is it possible to declare index in cobol program? if it is not why its tell me pls

3 Answers  


what happens if we wont give timestamp in precompilation process ?

4 Answers   Covansys,


Categories