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



> From: Joel Cochran
> 
> By enclosing these in procedures, they become very modular:
> 
> <psuedo-code>
> /free
>   if sflOption = 2 ;
>     invoiceUpdateScreen( myKeyValue );
>   elseif sflOption = 3 ;
>     invoiceCopyScreen( myKeyValue );
>   elseif sflOption = 4 ;
>     invoiceDeleteScreen( myKeyValue );
>   elseif sflOption = 5 ;
>     invoiceDisplayScreen( myKeyValue );
>   endif ;
> /end-free
> </psudoe-code>

Sure, but you could do that just as easily with a prototype with EXTPGM,
couldn't you?


> Putting them in an application binding directory makes it easy for any
> program to access the needed procedures.

Yet, with the dynamic call you don't need to worry about the binding
directory or any of that extra stuff.  You just put the program name in
the EXTPGM parameter, and you're done.


> Can this be replicated with Dynamic calls?  Sure, but so can almost
> anything on an academic level.  This just makes sense to me in this
age
> of modular design.

It's always been my contention that programs *are* modular.  There are
places where procedures are better suited, but this doesn't seem to be
the place, to me.


> Naturally you can include whatever kind of return
> value suits your needs which makes it nice in embedded statements:
> 
> <psuedo-code>
>   /free
>     if invoiceItemDeleted( myKeyValue );
>       // do additional stuff
>     endif ;
>   /end-free
> </psuedo-code>
> 
> Necessary? No, just nice and fairly clean.  And of course, with
*CALLER
> activation group the service program is pretty fast.

This is the only real benefit of a procedure - the fact that it can
return a value.  But given the bidirectional nature of parms, it's not
much different:

>     rc = invoiceItemDeleted( myKeyValue );
>     if rc;

It does require the extra data definition, though, and from that
standpoint I can see the issue.  So I guess it's just a matter of taste
at that point.

Service programs are a different animal, anyway.  I was asking about
static binding, which to me just doesn't make sense.  If you have the
same program statically bound into 15 calling programs, then you have 15
different copies of the program in your PAG, and potentially 15
DIFFERENT copies.

Joe


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.