View previous topic :: View next topic
|
Author |
Message |
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
Sorry, that was a mistake i made while sending the query. It shud be like
Input1:
AAA
AAA
BBB
CCC
DDD
Input2:
AAA
AAA
BBB
CCC
Input3:
AAA
CCC
My outptu file shud be like
Output file:
AAA
CCC
So basically I need those records common all the input files with no dups. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
AAA
AAA
BBB
CCC
DDD
/*
//IN2 DD *
AAA
AAA
BBB
CCC
/*
//IN3 DD *
AAA
CCC
/*
//T1 DD DSN=&&I1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN1) TO(T1) ON(1,3,CH) FIRST USING(CTL1)
SELECT FROM(IN2) TO(T1) ON(1,3,CH) FIRST USING(CTL2)
SELECT FROM(IN3) TO(T1) ON(1,3,CH) FIRST USING(CTL3)
SPLICE FROM(T1) TO(OUT) ON(1,3,CH) -
WITHEACH WITH(82,1) WITH(83,1) USING(CTL4)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(81:C'111')
/*
//CTL2CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(81:C'222')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(81:C'333')
/*
//CTL4CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(81,3,CH,EQ,C'123'),
OUTREC=(1,80)
/*
|
|
|
Back to top |
|
|
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
Frank,
When I am trying to copy the the 3 input files into the same temporary file T1, instead of appending the records the records are getting overwritten. |
|
Back to top |
|
|
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
Frank,
Sorry for this posting. I found out the mistake in the JCL and corrected it. Now everything is working fine. Thanks for all your help.
Thanks,
Nithin. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
When I am trying to copy the the 3 input files into the same temporary file T1, instead of appending the records the records are getting overwritten. |
That would happen if you didn't have MOD for the T1 data set. |
|
Back to top |
|
|
|