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
 

 

How to join two file on primary key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
sudip_ghanvat

New User


Joined: 05 Apr 2007
Posts: 15
Location: pune

PostPosted: Mon Oct 15, 2007 7:07 pm    Post subject: How to join two file on primary key
Reply with quote

Hi,
I have two file filea and fileb.I have sorted first file on origin_name,
header-date,header_time,tran-count(primary key)

and second file fileb sorted on origin_name,header_name,header_date,
header_time,tran_count,service_id(primary key)

i want join on the primary key of filea(one filea to many fileb)

means for one primary key on filea we have many records on fileb


Thanks,
sudip.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Oct 15, 2007 7:27 pm    Post subject:
Reply with quote

Hello,

Which CA product are you using?

Quote:
errrrrrrrrrrrrrrrrrrrrrrrrrrdsvdsvdvdvddsvdsv

Please edit your profile and replace or remove your "signature".
Back to top
View user's profile Send private message
bijumon

New User


Joined: 14 Aug 2006
Posts: 20
Location: Pune,India

PostPosted: Wed Oct 17, 2007 4:48 pm    Post subject:
Reply with quote

Hi,

Read the filea sequentially until end.

Do a dynamic read on fileb, with the key read from filea,and write the combined records into a new file. Which will have a record layout that can hold both filea's and fileb's prime key values.

And as Dick mentioned, please say post which product you are using, without which no one will be able to tell you about the Lmitations/Advantages of the product you are using. If there are any.


Thanks & Regards,
----------------------
Biju.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Oct 18, 2007 12:18 am    Post subject:
Reply with quote

Hello,

Quote:
Do a dynamic read on fileb, with the key read from filea,
This will be difficult if fileb is qsam. . .

If fileb is qsam it is a very bad idea to read all of fileb for each record in filea looking for "matches". Several people have done this and then asked why it "runs so long".

Hopefully, Sudip will provide more info.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Oct 18, 2007 8:59 am    Post subject:
Reply with quote

Sudip,

In addition to what Dick had asked, we expect some examples for your requirement.
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 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 Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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