Hi everyone,
I have developed a small COBOL program on AS400 and it was successfully compiled. Executing the program I encounter the following message
Cause . . . . . : Program TERRORLST in USERDEV issued an I/O operation on
file TERROR at COBOL statement 133 which failed with file status 95; and no
error handler existed. When an unsuccessful file status is received from an
I/O operation, an AT END/INVALID KEY, USE PROCEDURE, or FILE STATUS should
be coded to handle the error. Recovery . . . : Enter a G to continue the
program at the next COBOL statement; or a C,D, or F to cancel the program. A
D will also create a dump of the COBOL identifiers and an F will dump both
A summary of statements referred in the job log is as follows(this is from the compiled report);
100-Initialization-Rtn.
011800 100-INITIALIZATION-RTN.
011900
133 012000 OPEN INPUT BLACKLST
012100 INPUT MFAIVRP
012200 OUTPUT BLACK-LIST-REPORT-FILE.
134 012300 ACCEPT WS-RUN-DATE FROM DATE.
135 012400 MOVE WS-RUN-MONTH TO HL-RUN-MONTH.
136 012500 MOVE WS-RUN-DAY TO HL-RUN-DAY.
137 012600 MOVE WS-RUN-YEAR TO HL-RUN-YEAR.
138 012700 PERFORM 215-READ-MFAIVRP-RTN.
200-PROCESS-RECORD-RTN.
MOVE WS-FIRST-NAME TO TR-FIRST-NAME
READ BLACKLST
INVALID KEY
PERFORM 215-READ-MFAIVRP-RTN
NOT INVALID KEY
PERFORM 205-WRITE-RECORD-RTN
END-READ.
215-READ-MFAIVRP-RTN.
READ MFAIVRP
AT END
MOVE 'NO' TO ARE-THERE-MORE-IVRP
END-READ.
MOVE FIRST-NAME OF MFAIVRP TO WS-FIRST-NAME.
MOVE INITIALS OF MFAIVRP TO WS-MIDDLE-NAME.
MOVE LAST-NAME OF MFAIVRP TO WS-LAST-NAME.
Can anyone please help me to resolve this issue.
Thanks.
Tony
I have developed a small COBOL program on AS400 and it was successfully compiled. Executing the program I encounter the following message
Cause . . . . . : Program TERRORLST in USERDEV issued an I/O operation on
file TERROR at COBOL statement 133 which failed with file status 95; and no
error handler existed. When an unsuccessful file status is received from an
I/O operation, an AT END/INVALID KEY, USE PROCEDURE, or FILE STATUS should
be coded to handle the error. Recovery . . . : Enter a G to continue the
program at the next COBOL statement; or a C,D, or F to cancel the program. A
D will also create a dump of the COBOL identifiers and an F will dump both
A summary of statements referred in the job log is as follows(this is from the compiled report);
100-Initialization-Rtn.
011800 100-INITIALIZATION-RTN.
011900
133 012000 OPEN INPUT BLACKLST
012100 INPUT MFAIVRP
012200 OUTPUT BLACK-LIST-REPORT-FILE.
134 012300 ACCEPT WS-RUN-DATE FROM DATE.
135 012400 MOVE WS-RUN-MONTH TO HL-RUN-MONTH.
136 012500 MOVE WS-RUN-DAY TO HL-RUN-DAY.
137 012600 MOVE WS-RUN-YEAR TO HL-RUN-YEAR.
138 012700 PERFORM 215-READ-MFAIVRP-RTN.
200-PROCESS-RECORD-RTN.
MOVE WS-FIRST-NAME TO TR-FIRST-NAME
READ BLACKLST
INVALID KEY
PERFORM 215-READ-MFAIVRP-RTN
NOT INVALID KEY
PERFORM 205-WRITE-RECORD-RTN
END-READ.
215-READ-MFAIVRP-RTN.
READ MFAIVRP
AT END
MOVE 'NO' TO ARE-THERE-MORE-IVRP
END-READ.
MOVE FIRST-NAME OF MFAIVRP TO WS-FIRST-NAME.
MOVE INITIALS OF MFAIVRP TO WS-MIDDLE-NAME.
MOVE LAST-NAME OF MFAIVRP TO WS-LAST-NAME.
Can anyone please help me to resolve this issue.
Thanks.
Tony