I'm using SYNCSORT and trying exclude 223 bytes of a VB record, keeping it VB.
Input file has 4223 bytes (+4 RDW=4227).
Output file should have 4000 bytes (+4 RDW=4004).
The file has header and trailer:
=> header - first 6 pos. binary (zeros)
=> trailer - first 6 pos. binary (high values)
When header or trailer i'm excluding last 223 bytes, otherwise pos. 5 to 227.
I'm using the syncsort code below and it comes out with a incompatible LRECL error:
//STEP2 EXEC PGM=SORT,REGION=4096K
//SORTIN DD DISP=SHR,DSN=INPUT.FILE
//SORTOUT DD DSN=OUTPUT.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,SPACE=(CYL,(500,500),RLSE),
// DCB=(LRECL=4004,BLKSIZE=27998,RECFM=VB)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(5,6,BI,NE,X'000000000000',AND, HEADER
5,6,BI,NE,X'FFFFFFFFFFFF'), TRAILER
BUILD=(1,4,228,4000)),
IFTHEN=(WHEN=(5,6,BI,EQ,X'000000000000',OR, HEADER
5,6,BI,EQ,X'FFFFFFFFFFFF'), TRAILER
BUILD=(1,4,5,4000))
//*
//
********************************* Top of Data **********************************
SYNCSORT FOR Z/OS 1.4.0.1R U.S. PATENTS: 4210961, 5117495 (C) 2010 SYNCSO
SYSIN :
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(5,6,BI,NE,X'000000000000',AND, HEADER
5,6,BI,NE,X'FFFFFFFFFFFF'), TRAILER
BUILD=(1,4,228,4000)),
IFTHEN=(WHEN=(5,6,BI,EQ,X'000000000000',OR, HEADER
5,6,BI,EQ,X'FFFFFFFFFFFF'), TRAILER
BUILD=(1,4,5,4000))
WER276B SYSDIAG= 234245, 893166, 893166, 2043075
WER164B 1,140K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,116K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VB ; LRECL= 4227; BLKSIZE= 27998
WER073I SORTIN : DSNAME=VMMSLXDA.NPIXX2X.IVM20.AODET.G0107V00
WER237I OUTREC RECORD LENGTH = 4227
WER110I SORTOUT : RECFM=VB ; LRECL= 4004; BLKSIZE= 27998
WER074I SORTOUT : DSNAME=VMMSLXDA.NPIXX2X.IVM20.AODET.G0107.M223
WER247A SORTOUT HAS INCOMPATIBLE LRECL
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************** Bottom of Data ********************************
SYNCSORT FOR Z/OS 1.4.0.1R U.S. PATENTS: 4210961, 5117495 (C) 2010 SYNCSO
SYSIN :
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(5,6,BI,NE,X'000000000000',AND, HEADER
5,6,BI,NE,X'FFFFFFFFFFFF'), TRAILER
BUILD=(1,4,228,4000)),
IFTHEN=(WHEN=(5,6,BI,EQ,X'000000000000',OR, HEADER
5,6,BI,EQ,X'FFFFFFFFFFFF'), TRAILER
BUILD=(1,4,5,4000))
WER276B SYSDIAG= 234245, 893166, 893166, 2043075
WER164B 1,140K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,116K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VB ; LRECL= 4227; BLKSIZE= 27998
WER073I SORTIN : DSNAME=VMMSLXDA.NPIXX2X.IVM20.AODET.G0107V00
WER237I OUTREC RECORD LENGTH = 4227
WER110I SORTOUT : RECFM=VB ; LRECL= 4004; BLKSIZE= 27998
WER074I SORTOUT : DSNAME=VMMSLXDA.NPIXX2X.IVM20.AODET.G0107.M223
WER247A SORTOUT HAS INCOMPATIBLE LRECL
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************** Bottom of Data ********************************