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 UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Need input in Scheduling Benchwarmer CA Products 5 Tue Jun 06, 2017 1:44 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm


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