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

More than 2 input files in Easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Wed Jul 15, 2009 10:28 am
Reply with quote

Hi, All

I am having a problem in merging my datasets to extract the complete information.

Input 1
U1 P1 N1
U1 P2 N2

Input 2
U1 P1 A1
U1 P2 A2


Input 3
U1 P1 S1
U2 P2 S2
U2 P3 S3

Output dataset
U1 P1 N1 A1 S1
U2 P2 N2 A2 S2

All the 3 input have LRECL=80

The Key to be used is U1 & P1
U1 is of 2 character & P1 is of 10 character
N1 & A1 are 50 character long & S1 is 2 character long.

Can I merge this in a single Easytrieve.

Thanks
Rahul Gupta
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Jul 15, 2009 8:16 pm
Reply with quote

Yes, In the "JOB INPUT" specify all 3 files and both keys for each.
Remember to consider: Could any of the files have duplicate keys or missing keys and if so what result should it give.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Wed Jul 15, 2009 10:18 pm
Reply with quote

Douglas

Thanks for your response.

I am having another problem here that I don't know how to do this
"Remember to consider: Could any of the files have duplicate keys or missing keys and if so what result should it give."
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Jul 15, 2009 10:41 pm
Reply with quote

First the answers to the questions need to be obtained:
Can File 1 have duplicate keys?
Can File 2 have duplicate keys?
Can File 3 have duplicate keys?
Can File 1 have missing keys (that are in File 2 and/or File 3)?
Can File 2 have missing keys (that are in File 1 and/or File 3)?
Can File 3 have missing keys (that are in File 1 and/or File 2)?

If there may be duplicates on 1 file put that file first.
If any of the Files may have missing keys, use "IF file-name" before using any field from that file so that you do not reference non-existent fields.

Try it and let us know you get stuck on anything.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top