Re: Variable Length Input File
- From: "Alistair" <alistair@xxxxxxxxxxxxxxxxxxxxx>
- Date: 23 Dec 2006 05:44:58 -0800
docdwarf@xxxxxxxxx wrote:
In article <1166790950.351244.67040@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Alistair <alistair@xxxxxxxxxxxxxxxxxxxxx> wrote:
Alex Flinsch wrote:
On Thu, 21 Dec 2006 18:58:39 -0600, P. Raulerson wrote:
Wow -that's a slightly different animal than what I took you to originally
mean. Each run is essentially brand new file, huh?
[snip]
ALTERNATIVELY (and I like this one): set the FD to contain a record of
one character length fixed blocked and read repeatedly, building the
record in working storage.
I can't believe that no-one came up with that one before me.
Perhaps they did, Mr Maclean, and discarded it as being of... questionable
utility on an IBM-style mainframe. Given:
FILE-CONTROL.
SELECT INFILE
ASSIGN TESTA
ORGANIZATION SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD INFILE.
01 INREC PIC X(01).
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
OPEN INPUT INFILE.
THE-READ.
READ INFILE.
CLOSE INFILE.
THE-GOBACK.
GOBACK.
... compiled with IBM Enterprise COBOL for z/OS and OS/390 3.2.1 and my
sites's usual compiler invocation parms...
... and a TESTA dataset defined (via IEFBR14) as
//TESTA DD DSN=USERID1.TESTA,
// DISP=(,CATLG,CATLG),
// UNIT=SYSDA,
// SPACE=(TRK,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=30,BLKSIZE=27990)
... and run-JCL of:
//STEP020 EXEC PGM=SKELPROG
//TESTA DD DSN=USERID.TESTA,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
... the job ABENDs with IEF450I WSXSKEL0 STEP020 - ABEND=S000 U4038
REASON=00000001 and the following messages in the SYSOUT:
IGZ0201W A file attribute mismatch was detected. File INFILE in program
SKELPROG had a record length of 1 and the file specified in the ASSIGN
clause had a record length of 30.
IGZ0035S There was an unsuccessful OPEN or CLOSE of file TESTA in program
SKELPROG at relative location X'0358'. Neither FILE STATUS nor an ERROR
declarative were specified. The status code was 39. From compile unit
SKELPROG at entry point SKELPROG at statement 19 at compile unit offset
+00000358 at entry offset +00000358 at address 000082C8.
DD
How about over-riding the DCB?
.
- Follow-Ups:
- References:
- Variable Length Input File
- From: manubay
- Re: Variable Length Input File
- From: P. Raulerson
- Re: Variable Length Input File
- From: Alex Flinsch
- Re: Variable Length Input File
- From: Alistair
- Re: Variable Length Input File
- From:
- Variable Length Input File
- Prev by Date: Re: Celebrating the creator of Cobol
- Next by Date: Re: Variable Length Input File
- Previous by thread: Re: Variable Length Input File
- Next by thread: Re: Variable Length Input File
- Index(es):