× 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: Ken.Slaugh@xxxxxxxxxx
  • Date: Thu, 27 Jul 2000 20:52:29 -0700


Passing a data structure can produce memory overlays an failures but the
convenience of just recompiling the programs from a common DDS based object
is an excellent way of handling versioning especially when the data files
used or maintained within these programs are also normally changing
definition as well.

     Besides, parameter validation is not a issue until the parameter in
question is referenced and field type is defined within the DDS so packed,
binary and strings are passed as defined within a string field. We've all
found it easier to pass strings anyway.

Ken Slaugh  (707) 795-1512 x118
Chouinard & Myhre, Inc.
AS/400 Professional Administrator/MSE
Client Access Specialist
http://www.cm-inc.com/


                                                                                
              
                    Gary Guthrie                                                
              
                    <GaryGuthrie@home        To:     RPG400-L@midrange.com      
              
                    .com>                    cc:                                
              
                    Sent by:                 Subject:     Re: just curious - 
Number of Parms  
                    owner-rpg400-l@mi                                           
              
                    drange.com                                                  
              
                                                                                
              
                                                                                
              
                    07/27/00 07:56 PM                                           
              
                    Please respond to                                           
              
                    RPG400-L                                                    
              
                                                                                
              
                                                                                
              



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




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


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.