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
 

 

Need Match/Merge sample code

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

New User


Joined: 15 May 2007
Posts: 3
Location: Pune

PostPosted: Thu Sep 06, 2007 8:14 pm    Post subject: Need Match/Merge sample code
Reply with quote

Can any one post a sample program which takes input from a sequential file of record length 2007 and eliminate records based on 20 given case numbers.

ie, every record needs to be checked with 20 case numbers and written to output file if it matches with any one of the case number.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Sep 06, 2007 8:22 pm    Post subject:
Reply with quote

Why don't you take a small look around......
2-File Match/Merge sample code
Back to top
View user's profile Send private message
lemojames

New User


Joined: 15 May 2007
Posts: 3
Location: Pune

PostPosted: Thu Sep 06, 2007 8:39 pm    Post subject:
Reply with quote

I had a look before posting... sorry to say that it doesn't help my requirement
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Sep 06, 2007 8:57 pm    Post subject:
Reply with quote

Are you searching for examples of EVALUATE verb ? or perhaps I didn't understand your question.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Sep 06, 2007 8:57 pm    Post subject:
Reply with quote

OK, why not read the file and compare the record against the 20 case numbers, if a match, write and loop to read the next, if no match, just loop to read the next......

BTW, I would be available, for a small fee, to write the code for you.... icon_wink.gif
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 Sep 06, 2007 9:09 pm    Post subject:
Reply with quote

Hello,

The suggested sample code can do exactly what you say you need to do.

Put the 20 case numbers in a file in case number sequence.

Sort the lrecl2007 file in case number sequence.

Customize the sample code to meet your requirement.

Run your match/merge creating the output you need.

That's all there is to it.

It would be a good idea to get familiar with the match/merge concept as you will need it repeatedly if you make a career of cobol programming. Your requirement is one that would make a good learning project.

If you use the sample code and have questions/problems, post a reply here and someone will be able to help.
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 UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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