IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Using Splice but it does not allow duplicates


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sonys
Currently Banned

New User


Joined: 16 Nov 2006
Posts: 3

PostPosted: Tue Jan 30, 2007 8:44 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jan 30, 2007 9:28 pm
Reply with quote

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
View user's profile Send private message
Sonys
Currently Banned

New User


Joined: 16 Nov 2006
Posts: 3

PostPosted: Wed Jan 31, 2007 8:38 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jan 31, 2007 9:06 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts How to remove block of duplicates DFSORT/ICETOOL 8
This topic is locked: you cannot edit posts or make replies. Compare files with duplicates in one ... DFSORT/ICETOOL 11
No new posts Merging 2 files but ignore duplicate... DFSORT/ICETOOL 1
No new posts COUNT the number of duplicates DFSORT/ICETOOL 3
Search our Forums:

Back to Top