Icetool- Splicing : More than one compare key

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
mayank122
Member
Posts: 3
Joined: Tue Jul 02, 2013 11:21 pm
Location: Bangalore

Icetool- Splicing : More than one compare key

Post by mayank122 » Tue Jul 02, 2013 11:28 pm

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:
Learning is Passion. Once you get it, You will be on Top of the world.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Wed Jul 03, 2013 12:09 am

Suggest you post all of the JCL and sort control statements.

Why does the posted control statement have different positions than the informational text?
Have a good one

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Wed Jul 03, 2013 1:46 am

Why can't you use JOINKEYS?

mayank122
Member
Posts: 3
Joined: Tue Jul 02, 2013 11:21 pm
Location: Bangalore

Post by mayank122 » Wed Jul 03, 2013 11:50 am

@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!!
Learning is Passion. Once you get it, You will be on Top of the world.

mayank122
Member
Posts: 3
Joined: Tue Jul 02, 2013 11:21 pm
Location: Bangalore

Post by mayank122 » Wed Jul 03, 2013 11:56 am

@William I am adding 2 steps in one through Icetool so I am preferring the Icetool here :lol:
Learning is Passion. Once you get it, You will be on Top of the world.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Thu Jul 04, 2013 2:26 am

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?

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others