|
> Will someone tell me what > to do so that I can update the > service programs in the binding > directory without having to recompile > every program that uses them? Binder source is the right place to be. I use my own signatures rather than let the compiler generate them. It's easier to read in DSPPGM! So, I might write a sockets program (Thanks, Scott!) that makes these procedures public: STRPGMEXP PGMLVL(*CURRENT) SIGNATURE(' 1.00 11 Sep 00') EXPORT SYMBOL("SOCKOPEN") EXPORT SYMBOL("SOCKREAD") EXPORT SYMBOL("SOCKWRITE") EXPORT SYMBOL("SOCKCLOSE") EXPORT SYMBOL("RETURNH_ERRNO") EXPORT SYMBOL("RETURN_ERRNO") ENDPGMEXP Then I create the service program: CRTSRVPGM SRVPGM(SOCKETSVC) EXPORT(*SRCFILE) SRCFILE(QSRVSRC) SRCMBR(*SRVPGM) Now, the service program has an embedded record of the signature. Then, I use it a while and realise I might be communicating to a Unix system, and need translation from ASCII to EBCDIC. I add a pair of new procedures and place them at the end: STRPGMEXP PGMLVL(*CURRENT) SIGNATURE(' 2.00 01 Jun 01') EXPORT SYMBOL("SOCKOPEN") EXPORT SYMBOL("SOCKREAD") EXPORT SYMBOL("SOCKWRITE") EXPORT SYMBOL("SOCKCLOSE") EXPORT SYMBOL("RETURNH_ERRNO") EXPORT SYMBOL("RETURN_ERRNO") EXPORT SYMBOL("A2E") EXPORT SYMBOL("E2A") ENDPGMEXP Then, I put these lines in the binder source ABOVE the earlier lines and change the *CURRENT to *PRV: STRPGMEXP PGMLVL(*CURRENT) SIGNATURE(' 2.00 01 Jun 01') EXPORT SYMBOL("SOCKOPEN") EXPORT SYMBOL("SOCKREAD") EXPORT SYMBOL("SOCKWRITE") EXPORT SYMBOL("SOCKCLOSE") EXPORT SYMBOL("RETURNH_ERRNO") EXPORT SYMBOL("RETURN_ERRNO") EXPORT SYMBOL("A2E") EXPORT SYMBOL("E2A") ENDPGMEXP STRPGMEXP PGMLVL(*PRV) SIGNATURE(' 1.00 11 Sep 00') EXPORT SYMBOL("SOCKOPEN") EXPORT SYMBOL("SOCKREAD") EXPORT SYMBOL("SOCKWRITE") EXPORT SYMBOL("SOCKCLOSE") EXPORT SYMBOL("RETURNH_ERRNO") EXPORT SYMBOL("RETURN_ERRNO") ENDPGMEXP When the service program is created, I use CRTSRVPGM SRVPGM(SOCKETSVC) EXPORT(*SRCFILE) SRCFILE(QSRVSRC) SRCMBR(*SRVPGM) And now, the service program will have a record of the earlier signature with 6 procedures as well as the new signature with 8. At run time, the programs using this service program will validate their signature (created during bind time) against all of the signatures stored in the service program. Older programs will have the older signature, and will match. My brand new program, when compiled and bound, will store the *CURRENT signature and of course will also match. I hope this helped some. --buck
As an Amazon Associate we earn from qualifying purchases.
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.