View previous topic :: View next topic
|
Author |
Message |
vjai6977
New User
Joined: 08 Aug 2008 Posts: 19 Location: Chennai
|
|
|
|
Hi,
I have the following input files.
Input file 1:
-------------
AAAAA 001
BBBBB 002
CCCCC 003
CCCCC 003
CCCCC 003
CCCCC 003
DDDDD 004
EEEEEE 005
EEEEEE 005
EEEEEE 005
FFFFFF 006
Input File 2:
-------------
003 XXXXX
005 YYYYYY
I want the following output file.
Output File:
-------------
AAAAA 001
BBBBB 002
CCCCC 003 XXXXX
CCCCC 003 XXXXX
CCCCC 003 XXXXX
CCCCC 003 XXXXX
DDDDD 004
EEEEEE 005 YYYYYY
EEEEEE 005 YYYYYY
EEEEEE 005 YYYYYY
FFFFFF 006
I tried to achieve this with ICETOOL-SPLICE KEEPNODUPS option, I am not getting the required result. Can you suggest a solution for this.
Regards,
Jai |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Jai,
You can use a DFSORT/ICETOOL job like the following to do what you asked for. I assumed your input files have RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes. (Note that I am copying file2 before file1.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
AAAAA 001
BBBBB 002
CCCCC 003
CCCCC 003
CCCCC 003
CCCCC 003
DDDDD 004
EEEEEE 005
EEEEEE 005
EEEEEE 005
FFFFFF 006
/*
//IN2 DD *
003 XXXXX
005 YYYYYY
/*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1)
SPLICE FROM(T1) TO(OUT) ON(8,3,CH) KEEPNODUPS -
WITHALL WITH(1,6)
/*
//CTL1CNTL DD *
INREC BUILD=(8:1,10,80:X)
/*
|
|
|
Back to top |
|
|
vjai6977
New User
Joined: 08 Aug 2008 Posts: 19 Location: Chennai
|
|
|
|
Hi Frank,
This is a good learning about 'WITHALL WITH' parameter how to make use of it with SPLICE. This workd out for me. Thanks for your solution.
Regards,
Jai |
|
Back to top |
|
|
|