John Mattson wrote:
> Just found out that REXX can't handle spanned records, at least
at
> OS/390 2.10.
> I am getting the data from Windows (of course), and need to put
it
> into a program (Cobol) which wants LRECL=32,000, BUT it can handle
> multiple physical records being needed for a single logical record. I
> have to keep the data beyond 32k, and I just put it into the next record.
> Each logical record has a specific format in the first few characters, so
> it will work.
> >
> > In a bit of a crunch here. Anybody have a REXX that will read a
> > DCB=(RECFM=VBS,LRECL=X,BLKSIZE=32760) file which has records
> > with LRECL >
> > 32760, and create a new file with LRECL of something less
> > than 32760? Or
> > some other utility to do the same thing, I'm easy.
DFSORT doesn't actually support LRECL=X data sets, but you can override
LRECL=X with LRECL=32761 (the maximum allowed by JCL) to fool it if your
input data set doesn't have any records greater than 32761 bytes. In that
case, I think the DFSORT job below will do what you want. It will create a
VB/32000 output data set by checking for records greater than 32000 bytes,
and splitting each such record into a 32000 byte record and a second record
with the RDW and the rest of the first record.
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=inputfile,DISP=SHR,LRECL=32761
//SORTOUT DD DSN=outputfile,...,
// RECFM=VB,LRECL=32000
//SYSIN DD *
OPTION COPY
OUTFIL IFTHEN=(WHEN=(1,2,BI,GT,32000),
BUILD=(1,32000,/,1,4,32001))
/*
Frank Yaeger - DFSORT Team (IBM)
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html