Page 1 of 1

Icetool- Splicing : More than one compare key

Posted: Tue Jul 02, 2013 11:28 pm
by mayank122
It's regarding the Icetool-Splicing.

I am comparing the two Files on basis of two key field. Can any one suggest that how can we add two key field ( to compare) in the "on" during the splicing

I am able to do it for one field :lol: and the syntax in below

SPLICE FROM(T1) TO(OUT) ON(1,4,CH) ON(6,8,CH) WITH(23,1) USING(CTL3)

One key is --> 6,8,ch
second key is ----> 12,5,ch

How can we add the second compare key in the above splice syntax ? :roll:

Posted: Wed Jul 03, 2013 12:09 am
by DikDude
Suggest you post all of the JCL and sort control statements.

Why does the posted control statement have different positions than the informational text?

Posted: Wed Jul 03, 2013 1:46 am
by William Collins
Why can't you use JOINKEYS?

Posted: Wed Jul 03, 2013 11:50 am
by mayank122
@DIkDude I was just giving example and by mistake i had given different key position to present the scenario .. Please find the JCL below..

//JOB EXEC PGM=ICETOOL,REGION=0M,PARM='CORE=MAX'
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SORTWK01 DD UNIT=SORTWK,SPACE=(6000,(7000),,,ROUND)
//SORTWK02 DD UNIT=SORTWK,SPACE=(6000,(7000),,,ROUND)
//SORTWK03 DD UNIT=SORTWK,SPACE=(6000,(7000),,,ROUND)
//$ORTPARM DD DSN=FFA.CONTROL(APAXC256),DISP=SHR
//SYSOUT DD SYSOUT=A
//SYSUDUMP DD SYSOUT=(A,,DUMP),HOLD=YES
//TOOLIN DD *
COPY FROM(SORTIN1) TO(TEMP) USING(SRT2)
COPY FROM(SORTIN2) TO(TEMP) USING(SRT3)
SPLICE FROM(TEMP) TO(OUT) ON(67,11,CH) ON(78,2,CH) W
WITH(178,2) USING(SRT4) KEEPNODUPS
//*
//*
//SORTIN1 DD DSN=FILEA,DISP=SHR * 177 RECROD LENGTH
//SORTIN2 DD DSN=FILEB,DISP=SHR * 177 RECROD LENGTH
//* COMAPRE KEY 67,11,CH AND 78,2,CH
//SRT2CNTL DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(178:C'BB')
//SRT3CNTL DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(178:C'BB')
//*
//TEMP DD DSN=FILEC,
// DISP=(MOD,CATLG,DELETE),
// UNIT=SYSD@,
// LABEL=RETPD=1,
// DCB=(BLKSIZE=0,LRECL=179,RECFM=FB),
// SPACE=(CYL,(10,20),RLSE)
//*
//SRT4CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(178,2,CH,EQ,C'BB'),
BUILD=(1,177)
//*
//OUT DD DSN=CDI5.H385.CTPCRM,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSD@,
// LABEL=RETPD=1,
// DCB=(BLKSIZE=0,LRECL=177,RECFM=FB),
// SPACE=(CYL,(10,20),RLSE)
//*

I am getting the Proper result now :lol: but just want to clear one doubt as per your's valuable experience

.It's working with 1) SPLICE FROM(T1) TO(OUT) ON(1,4,CH) ON(6,8,CH) WITH(23,1) USING(CTL3)
2) SPLICE FROM(T1) TO(OUT) ON(1,4,CH) ON(6,8,CH) WITHALL WITH(23,1) USING(CTL3)

What is the difference in these two ( In one I am using WITHALL and in Second I am not using Withall ) :roll: Please clear the doubt thanks!!

Posted: Wed Jul 03, 2013 11:56 am
by mayank122
@William I am adding 2 steps in one through Icetool so I am preferring the Icetool here :lol:

Posted: Thu Jul 04, 2013 2:26 am
by William Collins
So, you're saying that because you've made it overcomplicated, you want to keep it overcomplicated?

If you want to know what is going on, please post the full sysout from the step, in the Code tags.

You do realise that your "two keys" are contiguous, so could be treated as one key?