Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

More than 2 input files in Easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: More than 2 input files in Easytrieve
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 37 Tue Dec 06, 2016 8:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us