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
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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