I need to override the logical file EDIAFRLE so it only contains a few records. It's important that this is done in the CL, so we don't need to pass all the parameters to the cobol program. Here's what I got:
cl
--
OPNQRYF FILE(EDIAFR) QRYSLT(&COMM) -
FORMAT(EDIAFRLE) OPNID(TST)
OVRDBF FILE(EDIAFRLE) TOFILE(TST)
CALL PGM(PTEST2)
DLTOVR FILE(*ALL)030211
CLOF TST
And in COBOL, I declare my file as follows:
PTEST2
INPUT-OUTPUT SECTION.
*---------------------
FILE-CONTROL.
SELECT EDIAFR ASSIGN TO DATABASE-EDIAFRLE
ORGANIZATION SEQUENTIAL.
However, when I try to open the file, I get a file status 42. Any thoughts? --------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.
cl
--
OPNQRYF FILE(EDIAFR) QRYSLT(&COMM) -
FORMAT(EDIAFRLE) OPNID(TST)
OVRDBF FILE(EDIAFRLE) TOFILE(TST)
CALL PGM(PTEST2)
DLTOVR FILE(*ALL)030211
CLOF TST
And in COBOL, I declare my file as follows:
PTEST2
INPUT-OUTPUT SECTION.
*---------------------
FILE-CONTROL.
SELECT EDIAFR ASSIGN TO DATABASE-EDIAFRLE
ORGANIZATION SEQUENTIAL.
However, when I try to open the file, I get a file status 42. Any thoughts? --------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.