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



Thanks to Rob and Joel for some excellent descriptions of these things.
I'm less lost than I was an hour ago!

Kevin Monahan
Sr Programmer/Analyst
JL Hammett Co
781-848-1000 x1114
www.hammett.com


> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
> Behalf Of rob@dekko.com
> Sent: Friday, April 19, 2002 11:41 AM
> To: rpg400-l@midrange.com
> Subject: Re: Service Programs
>
>
> This is a multipart message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> With a service program you can change certain parts of the service program
> and not have to recompile every program using it.
>
> Rule 1)  You could change the logic within a subprocedure with no worry
> about recompiling other programs.
> For example if I change
> x=y*2
> to
> x=y*3
> I will not have to recompile programs using this service program.
>
> Rule 2)  Do not remove a subprocedure, or modify the number of parameters
> passed to a particular subprocedure.
> Instead, change deprecated subprocedures to call new ones.  If you truly
> feel you need more parameters add a new subprocedure and have it do what
> it needs with the new parameters and try to use the old subprocedure for
> the old parameters.
>
> Rule 3)  If you add a new subprocedure to the service program you had
> better start learning about:
>  Signatures
>  Binder language
> Simply put - If have a service program with two subprocedures I would have
> the following:
> mylib/qsrvsrc(mysrvpgm).  This is binder language.  Only 3 verbs that I
> use.  Pretty simple stuff.
> STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE(*GEN)
> /********************************************************************/
> /*   *MODULE      SRVPGM       ROUTINES     04/11/02  14:01:00      */
> /********************************************************************/
>   EXPORT SYMBOL("ADDDAYS")
>   EXPORT SYMBOL("CENTER40")
>   EXPORT SYMBOL("NEWSUBPROC")
> ENDPGMEXP
> Then if I add a new subprocedure I would have:
> STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE(*GEN)
> /********************************************************************/
> /*   *MODULE      SRVPGM       ROUTINES     04/11/02  14:01:00      */
> /********************************************************************/
>   EXPORT SYMBOL("ADDDAYS")
>   EXPORT SYMBOL("CENTER40")
> ENDPGMEXP
> Notice the *CURRENT and the *PRV?
> CRTSRVPGM ... SRCFILE(ROUTINES/QSRVSRC) ...
> Now, If I do a
> DSPSRVPGM SRVPGM(ROUTINES/SRVPGM) DETAIL(*SIGNATURE)
> You will see:
> 49D4A34A5AE6D049BA18DEB5EB4FF53E
> B49D4A34A5AE60E85D74405E3288A2D7
> And If I do a
> DSPPGM PGM(ROB/CHECKRD) DETAIL(*SRVPGM)
> You will see
> Service
> Program     Library     Signature
> SRVPGM      ROUTINES    49D4A34A5AE6D049BA18DEB5EB4FF53E
> Notice how the signature matches one of the available signatures in my
> service program?
>
> Rob Berendt



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.