Joined: 21 Mar 2008 Posts: 161 Location: bangalore
hi all,
I want to remove dupliactes from a VB file's which has Header & Detail records which are in the format shown below.
File 1 - CG82.TSO.SOURCE.NOV11 VB(470 length(H rec) - 145 length(D rec)) - H & D positions are (63+4) - due to space constraint i have not showed all fields.
1) The H rec is always 470 bytes & D rec is always 145 length
2) The will always be one H & one D records as in the file below.
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+
1064458 LW900063774 20081007123031H LW9000
1003 LW900063774 D 0B9RAKIYX1702
1064458 LW900063843 20081007123031H LE8000
1009 LW900063843 D 0BE7HFN412408
File - 2 - CG82.TSO.SOURCE.NOV11A VB(470 length(H rec) - 145 length(D rec)) - H & D positions are (63+4) - due to space constraint i have not showed all fields.
1) The H rec is always 470 bytes & D rec is always 145 length
2) The will always be one H & one D records as in the file below.
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+
1064458 LW900063843 20081007123031H LE8000
1009 LW900063843 D 0BE7HFN412408
1064458 LW900057809 20081007123031H LW9000
1014 LW900057809 D 0HCP8HYUX0205
i need output in the same variable format as the input files
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+
1064458 LW900063774 20081007123031H LW9000
1003 LW900063774 D 0B9RAKIYX1702
1064458 LW900057809 20081007123031H LW9000
1014 LW900057809 D 0HCP8HYUX0205
The process is i'm appending file - 1 & file - 2 , then need to eliminate duplicates, i tried with the icetool step below but only H type records were coming in the output
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
If I understand what you want (and I'm not sure I do), this DFSORT/ICETOOL job will do it. The output records will be sorted by the 23,15,CH field. If you really need the output records in the original order of the input records, let me know.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
i wanted the first duplicate to exist & changed accordingly.
I don't know what you mean by that. Your example output has records with values at 23 and and 67 (H and D) that only appear in one of the input files. That would be a NODUPS situation. I don't know what you changed or what you mean by "wanted the first duplicate to exist". You need to explain more clearly what you want and what you changed, with examples that illustrate it.
Quote:
as i said in the first post .... i need them in original order.
Given that there are two input files, what exactly do you mean by "the original order"? Do you mean in the original order of the records from file1 and then the records from file2? Or do you mean something else? It would help if you showed an example with more input and output records that made it clear what you mean.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Getting the records in that order is a bit trickier, but you can do it with the DFSORT/ICETOOL job below. It uses DFSORT's new WHEN=GROUP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008). If you don't have that PTF installed, ask your System Programmer to install it.