IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need Logic to match the estimate file records with payment


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
Reply with quote

Hi Noor,

Check this link. It might help.

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

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
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: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Feb 19, 2007 7:52 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top