× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




On 13/01/2009, at 1:40 PM, Rory Hewitt wrote:

However, since the extra parameter would be a simple string, I think I *
might* simply define a UDS (data-area data-structure) in the caller, set it
to my required value and then use OUT to update it prior to calling the
programs. Those called programs that need the value can simply define the
same UDS and it's immediately available to them. The caller will
automatically create it in QTEMP and lock it, so it's effectively a CONST
parameter. Same system for RPG/400 or CL programs, I'd guess.

I'm trying to think of drawbacks to this approach... any thoughts.

Your interface is now split between parameters and a data area. A parameter block tends to be what is known as a "hardened interface". Stuff coming from a data area, or other source, tends to just be stuff. You'll think it's under your control because it's in QTEMP and it's set just before the call and it's used immediately by the caller, etc. etc. but it's just not a good idea. Sure, it solves the problem but not in a good way.

Fundamental problems are:
1) The dichotomy between sources of input
2) The size limit of a data area is considerably less than a parameter
3) Future requirements: additional values, different data types, etc.

My opinion is that while this approach will solve your immediate need it is likely to bite you in the arse in the future.


Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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.