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
 

 

Reg:- Merging two input sorted sequential file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Sat Jan 09, 2010 11:32 pm    Post subject: Reg:- Merging two input sorted sequential file
Reply with quote

Dear All,

Do we have any common programming logic in COBOL for the following scenarios.


1. One to One match
2. Left Outer Join (Similar to SQL join logic)
3. Right Outer Join (Similar to SQL join logic)
4. Full Outer Join (Similar to SQL join logic)


Note:-
Both the files are not of same layout.
But they do have common key variable like Account Number
Both the files are sorted based upon key variable

Please help or Guide me to overcome the above scenarios.

Ashok Kumar.K
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Jan 10, 2010 9:33 am    Post subject:
Reply with quote

There is a 'button' at the top of the page - PROGRAMS.

there is a lot of logic there.

Also, if you google, you will find thousands of sites with examples of programs.

Ibm's developer works technical manuals provides many examples.

ibm redbooks' site provides examples.

you are obviously just learning,
so you will need to do a lot of research and wade thru the 'advanced stuff'
to find answers to such basic questions as you have posed.
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 Jan 11, 2010 2:36 am    Post subject:
Reply with quote

Hello,

Near the top of the COBOL part of the forum is a "sticky" with working 2-file match/merge code. This will do most of what you want. Many-to-many will depend on the rules of the requirement.

That code works as so all you need to do is modify the record layouts and key location.

To download, use right-click and "save as".

With qsam files this is not a "join" - possibly i misunderstand something.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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