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



You need to use 'binder language'.

For example Let's assume I have a service program called SVCPGM.  It has 
one exported subprocedure called 'Alpha'.  I compile the module but do NOT 
do the CRTSRVPGM yet.

Now I create a simple source member in QSRVSRC.  It contains these two 
simple lines
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE(*GEN)
  EXPORT SYMBOL("ALPHA")
(Note:  I do NOT compile this source member.)

Now I do the CRTSRVPGM SRVPGM(SVCPGM) EXPORT(*SRCFILE) 
SRCFILE(MYLIB/QSRVSRC) SRCMBR(*SRVPGM)
A simple DSPSRVPGM shows a 'current' signature of 
A5AE6D8F472C4062A3B65BB050DA6E4A
And a DSPSRVPGM SRVPGM(SRVPGM) DETAIL(*SIGNATURE) shows one signature.

Now I add another subprocedure to the module and compile the module.
Then I modify QSRVSRC,SVCPGM and it now looks like
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE(*GEN)
  EXPORT SYMBOL("ALPHA")
  EXPORT SYMBOL("BRAVO") 
STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE(*GEN)
  EXPORT SYMBOL("ALPHA")
Notice how one as *CURRENT and one (or more) has *PRV?

Now I do the CRTSRVPGM SRVPGM(SVCPGM) EXPORT(*SRCFILE) 
SRCFILE(MYLIB/QSRVSRC) SRCMBR(*SRVPGM)
A simple DSPSRVPGM shows a 'current' signature of 
4A5AE6D8F472C409BC1E294E76E16998
And a DSPSRVPGM SRVPGM(SRVPGM) DETAIL(*SIGNATURE) shows two signatures of:
4A5AE6D8F472C409BC1E294E76E16998
A5AE6D8F472C4062A3B65BB050DA6E4A

Now if I have one old program, that used this service program, and do a 
DSPPGM PGM(GDIHQ/BACHKBA) DETAIL(*SRVPGM)
on it, I'll see that SVCPGM has a signature of 
A5AE6D8F472C4062A3B65BB050DA6E4A
If I compile a new program, linked to SVCPGM I'll that SVCPGM has a 
signature of 4A5AE6D8F472C409BC1E294E76E16998
No problem, since I used binder language, the service program SVCPGM 
supports both signatures.

Now if I add a third subprocedure the member in QSRVSRC may look like:
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE(*GEN)
  EXPORT SYMBOL("ALPHA")
  EXPORT SYMBOL("BRAVO") 
  EXPORT SYMBOL("CHARLIE") 
STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE(*GEN)
  EXPORT SYMBOL("ALPHA")
  EXPORT SYMBOL("BRAVO") 
STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE(*GEN)
  EXPORT SYMBOL("ALPHA")
And DSPSRVPGM SRVPGM(SRVPGM) DETAIL(*SIGNATURE) may show:
34A5AE6D8F472D319E34B65869F1E82D
4A5AE6D8F472C409BC1E294E76E16998
A5AE6D8F472C4062A3B65BB050DA6E4A

It's really terribly easy.  Actually I went to several sessions on this at 
COMMON and once it sunk in just how easy it really was I was amazed.

Now if your some sort of software house you could actually do something 
like:
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('V1.0.2')
  EXPORT SYMBOL("ALPHA")
  EXPORT SYMBOL("BRAVO") 
  EXPORT SYMBOL("CHARLIE") 
STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE('V1.0.1')
  EXPORT SYMBOL("ALPHA")
  EXPORT SYMBOL("BRAVO") 
STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE('V1.0.0')
  EXPORT SYMBOL("ALPHA")


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.