Thanks
jr
input file
ABCD2173|SAMPLE STAT1|VENDOR1 Status|ABC_12|00000000|0.000 |2010-12-0200:00:00.00000|20060101|00000000|
BCDE3150|SAMPLE STAT2|VENDOR2 Status|XYZ_22|00000000|0.000 |2010-12-0200:00:00.00000|20201010|00000000|
BCDE3150|SAMPLE STAT2|VENDOR2 Status|XYZ_22|00000000|0.000 |2010-12-0200:00:00.00000|20201010|00000000|
Required o/p
ABCDSAMPLE STAT1 VENDOR1 Status ABC000000000.000 2010-12-02 00:00:00.000002006010100000000
BCDESAMPLE STAT2 VENDOR2 Status XYZ000000000.000 2010-12-02 00:00:00.000002020101000000000
BCDESAMPLE STAT2 VENDOR2 Status XYZ000000000.000 2010-12-02 00:00:00.000002020101000000000
JCL
//STEP010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=USER1.ABC.SRCD,DISP=SHR
//SORTOUT DD DSN=USER1.TARGET.ABC,
// UNIT=DISK,SPACE=(TRK,(1,2),RLSE),
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY
INREC PARSE=(%00=(ENDBEFR=C'|',FIXLEN=04),
%01=(ENDBEFR=C'|',FIXLEN=30),
%02=(ENDBEFR=C'|',FIXLEN=30),
%03=(ENDBEFR=C'|',FIXLEN=03),
%04=(ENDBEFR=C'|',FIXLEN=08),
%05=(ENDBEFR=C'|',FIXLEN=10),
%06=(ENDBEFR=C'|',FIXLEN=25),
%07=(ENDBEFR=C'|',FIXLEN=08),
%08=(ENDBEFR=C'|',FIXLEN=08)),
BUILD=(%00,%01,%02,%03,%04,%05,%06,UFF,EDIT=(TTTTTTTTT TTTTTTTTTTTTTT),%07,%08)
/*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=USER1.ABC.SRCD,DISP=SHR
//SORTOUT DD DSN=USER1.TARGET.ABC,
// UNIT=DISK,SPACE=(TRK,(1,2),RLSE),
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY
INREC PARSE=(%00=(ENDBEFR=C'|',FIXLEN=04),
%01=(ENDBEFR=C'|',FIXLEN=30),
%02=(ENDBEFR=C'|',FIXLEN=30),
%03=(ENDBEFR=C'|',FIXLEN=03),
%04=(ENDBEFR=C'|',FIXLEN=08),
%05=(ENDBEFR=C'|',FIXLEN=10),
%06=(ENDBEFR=C'|',FIXLEN=25),
%07=(ENDBEFR=C'|',FIXLEN=08),
%08=(ENDBEFR=C'|',FIXLEN=08)),
BUILD=(%00,%01,%02,%03,%04,%05,%06,UFF,EDIT=(TTTTTTTTT TTTTTTTTTTTTTT),%07,%08)
/*