I'm trying to open a sequential dataset.
I get the file status 37, for which IBM says:
An OPEN statement was attempted on a file that would not support the open mode specified in the OPEN statement. Possible violations are:
- The EXTEND or OUTPUT phrase was specified but the file would not support write operations.
- The I-O phrase was specified but the file would not support the input and output operations permitted.
- The INPUT phrase was specified but the file would not support read operations.
I suspect the third, because the relevant bits of my program are :
*----------------------
INPUT-OUTPUT SECTION.
*----------------------
FILE-CONTROL.
* input file 1
SELECT INPUT-1-FILE
ASSIGN TO EXAMPLE
ORGANIZATION IS RELATIVE
ACCESS MODE IS DYNAMIC
RELATIVE KEY IS INPUT-1-ACCESS-KEY
FILE STATUS IS INPUT-1-FS
.
****************
DATA DIVISION.
****************
*--------------
FILE SECTION.
*--------------
* fichier 1
FD INPUT-1-FILE
.
01 INPUT-1-LINE.
05 filler PIC X(300).
*-------------------------
WORKING-STORAGE SECTION.
*-------------------------
77 INPUT-1-ACCESS-KEY PIC 9(3) comp value 1.
01 INPUT-1-FS PIC 99 value 00.
*********************
PROCEDURE DIVISION.
*********************
OPEN INPUT INPUT-1-FILE
DISPLAY INPUT-1-FS
And the DD card in my JCL looks like :
EXAMPLE DD DISP=SHR,DSN=MY.DATASET.NAME
We're using COBOL v5, so I checked IBM's relevant docs, but I can't find any reason that my file is not openable in input mode.
Here are my dataset's characteristics:
And the result of a VSAM listcat: