Posted: Thu Oct 15, 2009 10:58 am Post subject: Search for DUP and increment only the first occurence
Hi All,
I need some help with creating a SORT card for below stated problem.
- I have list of DUP keys in file 1.
- I need to search for these keys in the entire GDG base and
- Need to increment the first set of occurence and extract all these records to a single flat file.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Oct 15, 2009 11:37 am Post subject:
Martin,
How do you differentiate EACH set? Do you mean to update the first set from gdg version it found first?
ex :
gdg 1 had key 11111111111 998877665 and also the same set is fund in gdg3 and gdg5 . so in output you will only update the records from gdg1 and leave the gdg3 and gdg5 as is?
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Oct 15, 2009 12:29 pm Post subject:
Martin wrote:
The entire combination of Emp num and the key will be present in only one gdg file.
- Martin
huh? Now I am confused if it is found only in one file , I am confused as to how differentiate which set to be updated? In your first post you show 16 records and you updated only the first 8 records. How did you decide to update the first 8 records? Is set of 8 records considered a SET? or how is it decided? _________________ Kolusu
www.linkedin.com/in/kolusu
The entire combination of Emp num and the key will be present in only one gdg file.
- Martin
huh? Now I am confused if it is found only in one file , I am confused as to how differentiate which set to be updated? In your first post you show 16 records and you updated only the first 8 records. How did you decide to update the first 8 records? Is set of 8 records considered a SET? or how is it decided?
We need to update the key untill the below condition is met :
Code:
Increment the DUP key by +1 untill (Pos 49: 3) = 600
Pos ( 49 :3 ) = 600 corresponds to end of first set.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum