JMP30310I-I OPEN ERROR, FILE=SCHOOLS.DAT. ACC-METHODS...
RUNNING COBOL V3, COBOL 85 (PROGRAMMING STAFF) ON WINDOWS XP PRO.
THE CODE IS AS FOLLOWS:
INPUT-OUTPUT SECTION.
FILE-CONTROL.
* declare schools file
SELECT schools-file ASSIGN TO "SCHOOLS.DAT"
ORGANIZATION IS INDEXED
RECORD KEY IS s-code-key
ACCESS MODE IS RANDOM
FILE STATUS IS file-status.
DATA DIVISION.
FILE SECTION.
* describe schools file
FD schools-file.
01 school-record.
03 s-code-key.
05 s-code PIC XXX999.
88 exit-key VALUE ZERO.
03 s-name PIC X(20).
03 s-street-name PIC X(15).
03 s-town PIC X(10).
WORKING-STORAGE SECTION.
01 file-status.
03 fiel-status-1 PIC X.
03 file-status-2 PIC X.
01 REDEFINES file-status PIC XX.
88 file-access-ok VALUE "00".
01 option PIC 9.
88 valid-option VALUE 0 THRU 1.
88 exit-option VALUE 0.
88 add-option VALUE 1.
01 reply PIC X.
88 valid-reply VALUE "Y", "y", "N", "n".
88 yes-reply VALUE "Y", "y".
PROCEDURE DIVISION.
control-procedure.
OPEN I-O schools-file
PERFORM get-option
PERFORM menu UNTIL exit-option
CLOSE schools-file
STOP RUN.
RUNNING COBOL V3, COBOL 85 (PROGRAMMING STAFF) ON WINDOWS XP PRO.
THE CODE IS AS FOLLOWS:
INPUT-OUTPUT SECTION.
FILE-CONTROL.
* declare schools file
SELECT schools-file ASSIGN TO "SCHOOLS.DAT"
ORGANIZATION IS INDEXED
RECORD KEY IS s-code-key
ACCESS MODE IS RANDOM
FILE STATUS IS file-status.
DATA DIVISION.
FILE SECTION.
* describe schools file
FD schools-file.
01 school-record.
03 s-code-key.
05 s-code PIC XXX999.
88 exit-key VALUE ZERO.
03 s-name PIC X(20).
03 s-street-name PIC X(15).
03 s-town PIC X(10).
WORKING-STORAGE SECTION.
01 file-status.
03 fiel-status-1 PIC X.
03 file-status-2 PIC X.
01 REDEFINES file-status PIC XX.
88 file-access-ok VALUE "00".
01 option PIC 9.
88 valid-option VALUE 0 THRU 1.
88 exit-option VALUE 0.
88 add-option VALUE 1.
01 reply PIC X.
88 valid-reply VALUE "Y", "y", "N", "n".
88 yes-reply VALUE "Y", "y".
PROCEDURE DIVISION.
control-procedure.
OPEN I-O schools-file
PERFORM get-option
PERFORM menu UNTIL exit-option
CLOSE schools-file
STOP RUN.