× 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: just curious - Number of Parms
  • From: Gary Guthrie <GaryGuthrie@xxxxxxxx>
  • Date: Thu, 27 Jul 2000 21:56:25 -0500

Ah, but there are excellent reasons to pass individual parameters. With
procedural RPG, you have parameter validation that occurs before
run-time (nice to avoid those failures). Additionally, use of a data
structure removes considerable flexibility. You can no longer take
advantage of those situations that allow you to do such things as pass
numeric parameters without worrying whether it is packed, zoned, ...

Of course, there are circumstances in which passing a data structure as
a parameter is indeed appropriate. However, I don't feel that using one
to avoid passing individual parameters qualifies as one of those
circumstances. 


Gary Guthrie
REAL Solutions Technical Support
NEWS/400 Technical Editor



jpcarr@TREDEGAR.COM wrote:
> 
> >Wouldn't it make sense to just send a data structure as single parameter.
> >Then you can externally define it with DDS.
> >Ken Slaugh  (707) 795-1512 x118
> 
> You got it Ken, I RARELY define individual parms.  I always pass a
> structure.
> 90% of the time I externally define it.  And now with the next release of
> RPGIV(?)
> we will be able to initialize D/S subfields with default values via the DDS
> DFT keyword.
> So even the default initialization is done via the Parameter template file
> external to the program.
> So no hard coding of INZ values..
> 
> If a field definition is changed,  You change the Field Reference, CHGPF on
> the Template file
> and recompile program.   You don't have to change source code nearly ever.
> 
> Just a thought
> 
> John Carr
> EdgeTech Inc
> 804-739-7689
> 
> +---
> | 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
> +---
+---
| 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.