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

How to join two file on primary key


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Mon Oct 15, 2007 7:27 pm
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
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

Moderator Emeritus


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

PostPosted: Thu Oct 18, 2007 12:18 am
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: 1436
Location: Bangalore,India

PostPosted: Thu Oct 18, 2007 8:59 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top