View previous topic :: View next topic
|
Author |
Message |
thunderstorm
New User
Joined: 23 Mar 2007 Posts: 35 Location: pune
|
|
|
|
Hello All,
I have a requirement where there are 2 input files of LRECL=10 and key is 4 bytes long. I need an output file which will have
1. records from File 1 where the complete record is not present in File 2
2. records from File 2 where the key matches with File 1 but the non key is different
3. records which are common to both File 1 and File 2
For the input files,
We will not have duplicate records in the entire record length in any one input file
1ST FILE.
ABCD909090
DEFG126567
HIJKL000000
OPQR111111
UYTR567678
GTHY787878
JUTH565656
JGDR454545
2ND FILE:
UYTR888888
DEFG786543
JGDR345678
OUTPUT FILE:
ABCD909090
DEFG786543
HIJKL000000
OPQR111111
UYTR888888
GTHY787878
JUTH565656
JGDR345678
I was wondering if this is possible thru SORT/ICETOOL
Thanks,
TS |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
thunderstorm,
Do you want 3 different output files? or a single out put file? |
|
Back to top |
|
|
thunderstorm
New User
Joined: 23 Mar 2007 Posts: 35 Location: pune
|
|
|
|
Kolusu,
Its a single output file containing all the 3 types
Thanks,
TS |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
thunderstorm,
Use the following DFSORT/ICETOOL JCL
Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=Your input file1,DISP=SHR
// DD DSN=Your input file2,DISP=SHR
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) FIRST ON(1,4,CH)
//* |
|
|
Back to top |
|
|
thunderstorm
New User
Joined: 23 Mar 2007 Posts: 35 Location: pune
|
|
|
|
using your icetool card , the below requirement is not getting met
2. records from File 2 where the key matches with File 1 but the non key is different |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
thunderstorm wrote: |
using your icetool card , the below requirement is not getting met
2. records from File 2 where the key matches with File 1 but the non key is different |
thunderstorm,
simply reverse the order of concatenation. Use file 2 first and file 1 next |
|
Back to top |
|
|
|