On Thu, Mar 28, 2019 at 11:18 AM Frank Swarbrick <
frank.swarbr...@outlook.com> wrote:

> Does anyone know of a standard z/OS utility that could parse a flatfile
> that has fullword delimited records?  That is, there is a fullword length
> followed by the record, followed by another fullword length field and
> another record, etc.  It would then write (sans length header) each record
> to a VB file.
>
> Rather than writing my own program to parse it...
>

How about a really off the wall method? I am assuming the data consists of
a fullword length indication, followed by that number of data bytes.
Iinterestingly enough, that is exactly what a FILEDATA=RECORD UNIX file
looks like. So you could do something like:


//COPYUNIX EXEC PGM=BPXBATCH
//STDOUT   DD SYSOUT=*
//STDERR   DD SYSOUT=*
//STDIN    DD DUMMY
//STDPARM  DD *
SH cp -B "//'input.file'" >/tmp/X
/*
//*
//COPYBACK EXEC PGM=IEBGENER
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   DUMMY
//SYSUT1   DD   PATH='/tmp/X',FILEDATA=RECORD,
//         PATHOPTS=(ORDONLY),PATHDISP=(DELETE,DELETE)
//SYSUT2   DD   DSN=something,DISP=(NEW,CATLG)
//         UNIT=SYSDA,SPACE=(CYL,(???,???),RLSE),
//         RECFM=VB,LRECL=?,BLKSIZE=0,DSORG=PS
//



-- 
I just burned 2000 calories!
That's the last time I'll nap with brownies in the oven.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to