×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




John,

Why export both GetClientName and GetRecord procedures?  Just export the
GetClientName.  Have GetClientName (and other similar getters) accepts
client & division and return the Name (or other value).  The exported
GetClientName calls the non-exported GetRecord procedure to read that client
record.

Have GetRecord guard it's read by checking the client & division on the
record with the passed client & division.  If it's already read in that
record GetRecord does nothing and returns.  If it hasn't read in that record
GetRecord chains to the record.  If the chain fails GetRecord can
clear/initialize the record fields.

This avoids problems like not calling GetRecord before calling
GetClientName.  It also makes the module easier to use -one less procedure
to call.

Paul

-- 
Paul Morgan
Senior Programmer Analyst - Retail
J. Jill Group
100 Birch Pond Drive, PO Box 2009
Tilton, NH 03276-2009
Phone: (603) 266-2117
Fax:   (603) 266-2333

"John" wrote

> Hello all,
>
>  I've written a *srvpgm to experiment with the RPG-based getter/setter
> methods discussed in recent newsletters and lists. A simple one with two
> modules: 'client_getrecord' to retrieve a PF record in to an ExtName DS in
> the *srvpgm  and 'client_getclname' to return a 30-char name to the
calling
> pgm.

> Many thanks, JK




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.