AAAAA123
BBBBB12
CCCCC21
This is my step:
//ICETOO EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SHOWDEF DD SYSOUT=*
//IN DD *
AAAAA1
AAAAA2
AAAAA3
BBBBB1
BBBBB2
CCCCC2
CCCCC1
//T1 DD DSN=DES.DESBCJ.ICETOO.TEMP,
// DISP=(MOD,CATLG,DELETE),
// SPACE=(TRK,(100,50),RLSE)
//OUT DD DISP=(,CATLG),SPACE=(TRK,(100,50),RLSE),
// DSN=DES.DESBCJ.ICETOO.FINAL
//TOOLIN DD *
SORT FROM(IN) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(1,5,CH) WITHEACH -
WITH(6,1) WITH(7,1) WITH(8,1)
/*
//CTL2CNTL DD *
OPTION EQUALS
SORT FIELDS=(1,5,CH,A)
OUTREC IFOUTLEN=8,
IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,2,ZD,RESTART=(1,5))),
IFTHEN=(WHEN=(81,2,ZD,EQ,+1),BUILD=(1,5,6:6,1)),
IFTHEN=(WHEN=(81,2,ZD,EQ,+2),BUILD=(1,5,7:6,1)),
IFTHEN=(WHEN=(81,2,ZD,EQ,+3),BUILD=(1,5,8:6,1))
//
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SHOWDEF DD SYSOUT=*
//IN DD *
AAAAA1
AAAAA2
AAAAA3
BBBBB1
BBBBB2
CCCCC2
CCCCC1
//T1 DD DSN=DES.DESBCJ.ICETOO.TEMP,
// DISP=(MOD,CATLG,DELETE),
// SPACE=(TRK,(100,50),RLSE)
//OUT DD DISP=(,CATLG),SPACE=(TRK,(100,50),RLSE),
// DSN=DES.DESBCJ.ICETOO.FINAL
//TOOLIN DD *
SORT FROM(IN) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(1,5,CH) WITHEACH -
WITH(6,1) WITH(7,1) WITH(8,1)
/*
//CTL2CNTL DD *
OPTION EQUALS
SORT FIELDS=(1,5,CH,A)
OUTREC IFOUTLEN=8,
IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,2,ZD,RESTART=(1,5))),
IFTHEN=(WHEN=(81,2,ZD,EQ,+1),BUILD=(1,5,6:6,1)),
IFTHEN=(WHEN=(81,2,ZD,EQ,+2),BUILD=(1,5,7:6,1)),
IFTHEN=(WHEN=(81,2,ZD,EQ,+3),BUILD=(1,5,8:6,1))
//
But this step doesn´t work for me, this is the out I get:
AAAAA
BBBBB
CCCCC
BBBBB
CCCCC
And this is the content of T1:
AAAAA1
AAAAA 2
AAAAA 3
BBBBB1
BBBBB 2
CCCCC2
CCCCC 1
AAAAA 2
AAAAA 3
BBBBB1
BBBBB 2
CCCCC2
CCCCC 1
T1 is ok for the splice, why splice doesn´t give me the out I need
sorry i m spanish and my english is poor...
thanks like always!!