Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
File matching based on a field

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

New User


Joined: 14 Aug 2007
Posts: 35
Location: Hyderabad

PostPosted: Tue Aug 25, 2009 9:56 pm    Post subject: File matching based on a field
Reply with quote

I have two input file.Input-1 and Input-2
I need to match both the files based on a field say sec-no
Input-1 may have more that 1 records with the same sec-no whereas it is unique in input-2
If sec-no from the Input-1 matches with sec-no in the input-2, write to output with the information from input-1 and input-2
If not matches, record should be written but corresponding input-2 fields in the output should be spaces.

I copied the input-2 file into a VSAM KSDS, with dynamic access and Key as sec-no

I just need to know how the logic should be written for reading the VSAM file for each record of the input-1
I have a very little knowledge how a KSDS file is processed for a match against a sequential file
Could anyone please help me out?
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: Tue Aug 25, 2009 10:04 pm    Post subject:
Reply with quote

Hello,

Instead of using a vsam file, suggest you download the sample 2-file match/merge code that is attached to a "Sticky" near the top of the cobol part of the forum.

It is a waste of resources to create/load/read a vsam file just to match the "keys".
Back to top
View user's profile Send private message
bibek24

New User


Joined: 14 Aug 2007
Posts: 35
Location: Hyderabad

PostPosted: Tue Aug 25, 2009 10:33 pm    Post subject: Reply to: File matching based on a field
Reply with quote

Where is the attachment? I didn't get it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Aug 25, 2009 10:35 pm    Post subject:
Reply with quote

Sticky containing cobol match/merge logic
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us