if this is not the format/place for a newbie then please let me know
This is a good place for these questions. It would have been most helpful if you had posted that you were using Syncsort initially (preferable in the title) - then DFSORT suggestions would not have been made.
Done correctly, it should work.
My bad. . . I didn't mean to use resize, i meant this could be done with Syncsort. And no, even in the newest release of Syncsort, RESIZE is not n the manual.
From elsewhere:
I have a file with records like this:
Code: Select all
Unix: /test/ama/file01/rm_ext/daily/source/AMR_BIU_EU_R03_H20110303_H
Unix: EDC_AMACAUBHSTAB.dat
Unix: /test/ama/file01/rm_ext/daily/source/AMR_BIU_EU_R03_H20110302_H
Unix: EDC_AMACAUBHSTAB.dat
Unix: /test/ama/file01/rm_ext/daily/source/AMR_BIU_EU_R03_H20110301_H
Unix: EDC_AMACAUBHSTAB.dat
I want the output like this:
Code: Select all
Unix: /test/ama/file01/rm_ext/daily/source/AMR_BIU_EU_R03_H20110303_HEDC_AMACAUBHSTAB.dat
Unix: /test/ama/file01/rm_ext/daily/source/AMR_BIU_EU_R03_H20110302_HEDC_AMACAUBHSTAB.dat
Unix: /test/ama/file01/rm_ext/daily/source/AMR_BIU_EU_R03_H20110301_HEDC_AMACAUBHSTAB.dat
Is this possible?
Thanks for your time.
Code: Select all
//SORT1 EXEC PGM=SORT
//SORTIN DD *
UNIX: /TEST/AMA/FILE01/RM_EXT/DAILY/SOURCE/AMR_BIU_EU_R03_H20110303_H
UNIX: EDC_AMACAUBHSTAB.DAT
UNIX: /TEST/AMA/FILE01/RM_EXT/DAILY/SOURCE/AMR_BIU_EU_R03_H20110302_H
UNIX: EDC_AMACAUBHSTAB.DAT
UNIX: /TEST/AMA/FILE01/RM_EXT/DAILY/SOURCE/AMR_BIU_EU_R03_H20110301_H
UNIX: EDC_AMACAUBHSTAB.DAT
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(91:ID=8,99:SEQ=1)),
IFTHEN=(WHEN=(99,1,ZD,EQ,1),BUILD=(1,69,21Z,91,8)),
IFTHEN=(WHEN=NONE,BUILD=(69Z,7,21,91,8))
SORT FIELDS=(91,8,ZD,A)
SUM FIELDS=(1,8,BI,9,8,BI,17,8,BI,25,8,BI,33,8,BI,41,8,BI,49,8,BI,
57,8,BI,65,8,BI,73,8,BI,81,8,BI,89,2,BI)
OUTREC BUILD=(1,89)
/*
Unless i've misunderstood something, this with proper modifications, should do what is wanted.