hchinnam Beginner
Joined: 04 Feb 2005 Posts: 31 Topics: 10
|
Posted: Wed Aug 27, 2008 7:33 am Post subject: Any alternate for Splice |
|
|
Hello all,
I am using following JCL to get the matching records between two files. My file1 has only 20000 accounts and my file2 has over 168,000,000 records (both are in sorted order). I am trying to get all the records from files2 that match with file1.
Is there any other efficient way of doing this? (Writing a program could solve my problem, but i am trying to do this using IBM utilities)
Code: |
//STEP01 EXEC PGM=ICETOOL
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//DFSPARM DD *
OPTION DYNALLOC=(SYSDA,20)
//IN1 DD DISP=SHR,DSN=file1
//IN2 DD DISP=SHR,DSN=file2
//OUT DD DSN=outfile,
// DISP=(NEW,CATLG),
// DCB=file2,
// DATACLAS=PRDCNORM
//TEMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),
// DATACLAS=PRDCNORM,DCB=LRECL=9201,RECFM=FB)
//TOOLIN DD *
COPY FROM(IN1) TO(TEMP1) USING(CTL1)
COPY FROM(IN2) TO(TEMP1) USING(CTL2)
SPLICE FROM(TEMP1) TO(OUT) ON(1,22,CH) -
WITH(1,9200) USING(CTL3) WITHALL
//CTL1CNTL DD *
INREC BUILD=(1:1,22,9201:C'X')
/*
//CTL2CNTL DD *
INREC OVERLAY=(9201:C'Y')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,
INCLUDE=(9201,1,CH,EQ,C'X'),
BUILD=(1,9200)
/*
|
Thanks,
Harsha Chinnam |
|