× 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.


  • Subject: RE: PI to replaced *Entry PLIST (was Because it's there... )
  • From: "ron hawkins" <hwarangron@xxxxxxxx>
  • Date: Fri, 4 May 2001 10:05:28 -0700
  • Importance: Normal


Jon,

<< If you use the %Parms built-in to test how many parameters were received
<< (and thereby avoid "touching" any that were not passed) then any RPGIV
<< program can handle optional parms.

I don't know about anybody else, but I'm starting to avoid this technique.
We have dozens of programs that employ this technique but it soon becomes a
maintenance nightmare. Let's say programA is called by programB and
programC. Now, programB wants to pass a new parameter to programA for a new
function. No problem, programA gets changed to only process the parameter if
it was passed. But now programC wants to pass a different function to
programA. It needs to pass the parameter that programB is passing in
addition to its parameter. But programC doesnt have, nor want to pass that
parameter. So now, programA needs to be coded not only to ignore parameters
it didn't get (easy enough) but also to check the parameters it did get to
make sure they are to be processed. You can't check for blanks or zeros,
because these might be valid as parameters, so you really need some keyword
(*OMIT) or value.

While I haven't changed our programs to use em yet, doesnt protoyping allow
for *OMIT exactly for this reason? So wouldn't it be better to prototype and
use the *OMIT method?

Ron Hawkins




+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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-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.