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: 10274
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: 10274
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 Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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