ajuatsgp wrote:but now with the current sort card again I have to split to two steps as I checked all the Operands available with SELECT operator(ex:ALLDUPS,NODUPS,HIGHER(x) etc) I can't use any of them neither can I ignore them. Is it possible to use the current sort card in CTL1
ajuatsgp ,
I am not sure as to why you are looking at the select operator and its options. The obsession of 1 step ? Do you realize that you can convert the PGM=SORT step to ICETOOL code just like you did with MERGE?
Well here is the code you can use
//TOOLIN DD *
MERGE FROM(IN1) TO (OUT1) USING(MERG)
SORT FROM(IN) TO(OUT) USING(CTL1)
//*
//MERGCNTL DD *
OPTION EQUALS
MERGE FIELDS=My reqd Fields
//*
//CTL1CNTL DD *
SORT FIELDS=(19,15,CH,A,
65,01,CH,A),EQUALS
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(81:65,1)),
IFTHEN=(WHEN=GROUP,KEYBEGIN=(19,15),PUSH=(82:81,1))
OUTFIL OMIT=(81,2,CH,EQ,C'L '),BUILD=(1,80)
//*
MERGE FROM(IN1) TO (OUT1) USING(MERG)
SORT FROM(IN) TO(OUT) USING(CTL1)
//*
//MERGCNTL DD *
OPTION EQUALS
MERGE FIELDS=My reqd Fields
//*
//CTL1CNTL DD *
SORT FIELDS=(19,15,CH,A,
65,01,CH,A),EQUALS
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(81:65,1)),
IFTHEN=(WHEN=GROUP,KEYBEGIN=(19,15),PUSH=(82:81,1))
OUTFIL OMIT=(81,2,CH,EQ,C'L '),BUILD=(1,80)
//*