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

A small query in matching module/program in PL/1


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kirtika

New User


Joined: 06 Nov 2009
Posts: 3
Location: Bangalore

PostPosted: Thu Jan 07, 2010 12:20 pm
Reply with quote

Hi,

I am new to PL/1 hence i am not sure of the approach to be followed

The query is we have 2 files in which
1. The master file that grows by 5K records every day
2. The second file which has 500 K records.

There is a 10 byte number field which is present in both input and master file.

We need to match the corresponding 8 digit field for the 10 digit field from master file and write it to the output file.

We need to design a new PL/1 program to do the matching.

Also the OSB system which we use does not support VSAM processing.
Hence request you to let me know what will be the efficient logic to achieve the same in PL/1
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jan 07, 2010 1:26 pm
Reply with quote

where are You facing issues?, the logic or the coding

Quote:
8 digit field for the 10 digit

usually the matching is done agains homogeneous <things>,
please clarify
Back to top
View user's profile Send private message
kirtika

New User


Joined: 06 Nov 2009
Posts: 3
Location: Bangalore

PostPosted: Thu Jan 07, 2010 1:52 pm
Reply with quote

Hi enrico

I need to know the logic to proceed
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jan 07, 2010 1:59 pm
Reply with quote

from Your profile I see that You list cobol as a skill!

There is a "sticky" in the "Mainframe COBOL" part of the Forum (2-File Match/Merge sample code) -- unload(download?) have a look there to find the logic! If you get stuck, please post us back with what you cannot understand
Back to top
View user's profile Send private message
kirtika

New User


Joined: 06 Nov 2009
Posts: 3
Location: Bangalore

PostPosted: Thu Jan 07, 2010 5:25 pm
Reply with quote

Hi Enrico,

Just now had a look.Thanks for the quick reply .

My doubt is ,its like we will have to loop through the entire master file to find the matching record.Is there a better and mor effecient way to use it

If you can provide any sample code for PL/1 for that ,it would be great

Thanks in Advance
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 07, 2010 10:33 pm
Reply with quote

Hello,

Quote:
its like we will have to loop through the entire master file to find the matching record.
Both files need to be in sequence before being read by your code.

Your code should read each record in both files only once (hence the term match/merge) and process depending on the records read. You will not loop thru either file multiple times.

Quote:
Is there a better and mor effecient way to use it
This is the more efficient way.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts RC query -Time column CA Products 3
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top