View previous topic :: View next topic
|
Author |
Message |
Sonys Currently Banned New User
Joined: 16 Nov 2006 Posts: 3
|
|
|
|
I have 2 DSNs,
File1 and File2
File1 has records as
1 x
2 Y
3 X
4 X
5 X
File2 has records as
1 a b c
1 a1 b1 c1
1
2
2
2
3
3
4
5
5
5
My output should be
1 a b c X
1 a1 b1 c1
1
2 a3 b3 c4 Y
2 Y
2
3
3
4
5
5
5
and so on
I tried using Splice but it does not allow duplicates. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I tried using Splice but it does not allow duplicates. |
It's not clear from your example what you want to do or what you mean by "Splice does not allow duplicates". SPLICE can do one-to-many with the WITHALL parameter if that's what you mean by "duplicates".
But I don't see any pattern in your output records, so I can't tell you how to do what you want to do. The 1's have an X in the first record, whereas the 2's have a Y in the first two records, and the rest of the records don't have an X at all. Where's the pattern there? How is anybody supposed to figure out from that example what you want? We can't read your mind. Please explain the "rules" for getting from the input records to the output records. What exactly are you trying to do? |
|
Back to top |
|
|
Sonys Currently Banned New User
Joined: 16 Nov 2006 Posts: 3
|
|
|
|
Sorry for the confusion....i was only trying explain better ....let me make it clear ...
File1 has records - Policy numbers and PostCode
Here the Policy numbers are unique
File2 has records
Policy numbers Risk Date Premiumvalues
Here policy numbers repeat
File3 Output
Policy numbers Date Premiumvalues PostCode
Now in the file3 output should have all the policy numbers from file2 and the corresponding postcode fom file1
Hope i am making sense now !!!
thanks in advance |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
What is the starting position, length and format of the policy number and postcode fields in input file1.
What is the starting position, length and format of the policy number, date and premium value field in input file2.
What is the RECFM and LRECL of each input file? |
|
Back to top |
|
|
|