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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: A small query in matching module/program in PL/1
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Thu Jan 07, 2010 1:26 pm    Post subject: Reply to: A small query in matching module/program in PL/1
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Thu Jan 07, 2010 1:59 pm    Post subject: Reply to: A small query in matching module/program in PL/1
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    Post subject:
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

Site Director


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

PostPosted: Thu Jan 07, 2010 10:33 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm


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