MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Matching logic from 2 files by using Cobol

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
babun
Beginner


Joined: 03 Aug 2005
Posts: 19
Topics: 9
Location: bangalore

PostPosted: Thu Apr 20, 2006 1:49 am    Post subject: Matching logic from 2 files by using Cobol Reply with quote

Hi
In Cobol ,Let's assume that we have 2 files.
I need to write the ,matching records from 2files into some other third file?

So when i am using the matching logic(i take first rec in 1st file n read it and compare it with all records of 2nd file ,,so when i am reaching the last record in 2nd file,,how it's going to come for the first record ,,to compare again with the 2nd record in 1st file with all records in 2nd file?)
Regard's
Babun
_________________
babu
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Crox
Beginner


Joined: 29 May 2004
Posts: 52
Topics: 9

PostPosted: Thu Apr 20, 2006 2:22 am    Post subject: Reply with quote

I guess you are studying the balance line standard problem also called Collating. The files should be sorted first and you will certainly not compare one record with all the others.... (just count out how many compares you will do if there are 100 in each, 200, 1000....)

You should study Jackson Structured Programming (JSP) or Volmac Structured Programming (VSP). It is about recognizing groups in your inputfiles and also recognizing when groups are matching and not matching.

In COBOL there are smart ways to combine the ID's for each file in one ID, which also includes the filestatus. In one IF, you should know a lot.
Back to top
View user's profile Send private message
hariavinash
Beginner


Joined: 21 Jan 2005
Posts: 52
Topics: 7

PostPosted: Thu Apr 20, 2006 5:06 am    Post subject: Reply with quote

Babun,

Please search before posting..

http://mvsforums.com/helpboards/viewtopic.php?t=11

cheers
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group