View previous topic :: View next topic
|
Author |
Message |
avina
New User
Joined: 04 Dec 2007 Posts: 16 Location: Kolkata
|
|
|
|
Hi,
I've 2 GDG generations and I want to compare the GDG versions and check for any new data. Please suggest an easy way using ICETOOL.
My GDG are of length 176 and I've three key fields as below (column postion and the lenght of the key).
PART_NO (1 : 18)
SUPPLIER_NO (31 :6)
DC_PART_NO (159: 18)
Many thanks.
Regards,
Avik. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the fact that You are dealing with GDG generations is irrelevant to the comparison
did You search the forums , there are gazillions of topics dealing with dataset comparison using JOINKEYS
take a shot at searching |
|
Back to top |
|
|
avina
New User
Joined: 04 Dec 2007 Posts: 16 Location: Kolkata
|
|
|
|
Thanks Enrico, but still can you show a simple way out. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
avina wrote: |
Thanks Enrico, but still can you show a simple way out. |
avina,
Simple way is to look at the examples of using JOINKEYS for various matching applications. Check Smart DFSORT Trick "Create files with matching and non-matching records" at:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
I guess you are looking for much simpler version like complete job. And here it is
Assuming that there is no need to normalize any of the comparision keys, the following DFSORT JCL will give you the desired results, which will write out any unmatched records from current generation.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//CURR DD DISP=SHR,DSN=Your.GDG.Base(0) <<< Current gdg generation
//PREV DD DISP=SHR,DSN=Your.GDG.Base(-1) <<< yesterday's gdg generation
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
JOINKEYS F1=CURR,FIELDS=(1,18,A,31,6,A,159,18,A)
JOINKEYS F2=PREV,FIELDS=(1,18,A,31,6,A,159,18,A)
JOIN UNPAIRED,F1,ONLY
//* |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
but still can you show a simple way out. |
dumb of me ...
I should have imagined that the sentence meant ...
I am too lazy to do it, i' ll just wait for somebody to give me a working and tested solution |
|
Back to top |
|
|
|