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 Logic to match the estimate file records with payment

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

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Sun Feb 18, 2007 3:30 pm    Post subject: Need Logic to match the estimate file records with payment
Reply with quote

Hi,

I have following 4 fields in 2 different files. Let us call 1 file as Estimate file(Master file) and another file as Payment file(which can have duplicates).

We have sorted both the file on the following basis Claimno, Client no,
Estimate code, Cover code.

All the above mentioned fields are Alphanumeric.

Can any of you give me logic to match the estimate file records with payment file records and write down the estimate file?

For eg:

IF EST-CLAIM-NO = PYT-CLAIM-NO AND
EST-CLT-NO = PYT-CLT-NO AND
EST-EST-CDE = PYT-EST-CDE AND
EST-COV-CDE = PYT-COV-CDE

The above code can easily find out matching records.

But I need to process record by record. As Estimate file is Master file. We need to pick one record from Estimate file and need to check in payment file for all the matching records for all the above mentioned fields.

Now problem I have here is if it doesn't match which file should i read now? Estimate file or Payment file? How can i check which is greater as it is alphanumeric?

Give me a shout if you require more clarification.

Thanks,
Noor.
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Feb 18, 2007 9:13 pm    Post subject:
Reply with quote

Hi Noor,

Check this link. It might help.

I got this by using "search" above with an argument of "match".

http://ibmmainframes.com/viewtopic.php?t=14892&highlight=match
Back to top
View user's profile Send private message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Mon Feb 19, 2007 12:59 pm    Post subject: Re: Need Logic to match the estimate file records with payme
Reply with quote

Hey,

Thanks for reply. I used some simple if and else to achieve my output.

I felt inspite of using Search which always search from begin to end...it is better to use IF ... else as it is sorted file.

Thanks once again.

Thanks,
Noor
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Mon Feb 19, 2007 7:52 pm    Post subject:
Reply with quote

Noorkh, you didn't understand the hint Jack gave you; we have a search function in the menu where you may search for previously posted questions (and solutions) regarding your question. icon_wink.gif
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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