Using syncsort , in a single SORT step i want to know how to copy first 25 records from input file and include a condition after that.
Ex: From the input file , copy first 25 records as it is and filter out the records with string equal 'ELEMENT' after that.
Am able to do one of the req where i have extracted the records with string equal 'ELEMENT.
000001 SORT FIELDS=COPY
000002 INCLUDE COND=(26,7,CH,EQ,C'ELEMENT')
Please let me know what is to be modified in the above SORT card to copy the first 25 records of the input file.
hi Bipin,
I have already tried this..Please find the below sysout mess which says beyond the record.
The seqnum inserted adds up the LRECL of the INREC to 141 instead of 133.
SYSIN :
SORT FIELDS=COPY
INREC FIELDS=(1,133,134:SEQNUM,8,ZD)
INCLUDE COND=((134,8,ZD,LE,25),AND,
(26,7,CH,EQ,C'ELEMENT'))
OUTREC FIELDS=(1,133)
WER276B SYSDIAG= 236280, 1454296, 1454296, 2806275
WER164B 5,140K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 100K BYTES RESERVE REQUESTED, 1,008K BYTES USED
WER146B 16K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FBA ; LRECL= 133; BLKSIZE= 2660
WER257I INREC RECORD LENGTH = 141
WER238I POTENTIALLY INEFFICIENT USE OF INREC
WER237I OUTREC RECORD LENGTH = 133
WER110I SORTOUT : RECFM=FBA ; LRECL= 133; BLKSIZE= 2660
WER250A INCLUDE/OMIT FIELD BEYOND RECORD
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE