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: 10210
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: 10210
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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm


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