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

Sequential Processing of Master and Trans file Logic


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalyanonnet

New User


Joined: 24 Oct 2006
Posts: 3

PostPosted: Tue Oct 24, 2006 2:30 am
Reply with quote

Hi,

I have a requirement. I have sequential two files.

Master file

000001 1001 KALYAN 20000
000002 1002 BBBB 5000
000003 1003 CCCC 6000
000004 1004 NNNN 7000
000005 1006 FFFFF 9000
000006 1007 TTTT 8000

Transaction File

1001 kalyan 20000
1001 kalyan 30000
1001 kalyan 20000
1002 bbbbbb 4000
1002 bbbbbb 20000
1002 bbbbbb 20000
1004 nnnnnn 20000
1004 nnnnnn 3000
1004 nnnnnn 1000
1004 nnnnnn 30000
1006 ffffff 6000
1006 ffffff 60000

Now i want to read first record from Master file (i.e. 000001) and verify with trans and retrieve all the matching records(i.e. 000001). Then the second record from Master file (i.e. 000002) and verify it with trans file (000002) and get related records and so on ..........

Note: When i try to fetch third match(000003) in trans file, I should not read the previous records(i.e. 000001,000002) in Trans file.


Can anyone explain me ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Oct 24, 2006 6:12 am
Reply with quote

mmwife provided an excellent program example of this logic at http://www.ibmmainframes.com/viewtopic.php?t=14892&sid=d10dc5959d81412f94600b7ba0c5190d
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Oct 24, 2006 9:50 pm
Reply with quote

Hi Dick,

Thanx for the "attaboy". Unfortunately, it's only 1/2 the ans.

The other 1/2 uses the control break algorithm. It's unusual to see them
both in the same pgm.

On 2nd thought, the control break logic for this one is trivial. Unless he has to report transaction activity.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
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
Search our Forums:

Back to Top