Adding Subprocedures to a Service Program, Revisited
September 11, 2002 Timothy Prickett Morgan
Hey, Ted:
Regarding your article, “Adding Subprocedures to a Service Program,” there’s a question I’ve always wondered about.
Why is the *CURRENT/*PRV way of handling new exports, such as this example:
STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL('ONEMORETHAN') EXPORT SYMBOL('TWICE') EXPORT SYMBOL('ONETHIRDOF') ENDPGMEXP STRPGMEXP PGMLVL(*PRV) EXPORT SYMBOL('ONEMORETHAN') EXPORT SYMBOL('TWICE') ENDPGMEXP STRPGMEXP PGMLVL(*PRV) EXPORT SYMBOL('ONEMORETHAN') ENDPGMEXP
so popular compared to the hard-coded signature method, where you only keep one export list, as shown in this example:
STRPGMEXP PGMLVL(*CURRENT) SIGNATURE("MATH") EXPORT SYMBOL('ONEMORETHAN') EXPORT SYMBOL('TWICE') EXPORT SYMBOL('ONETHIRDOF') ENDPGMEXP
|
You have to keep the exports in the same order and add news ones at the end anyway, so I don’t see the advantage of using *PRV signatures.
— Barbara Morris
RPG Compiler Development, IBM
I’m not sure why the SIGNATURE(*GEN) method is so popular, but I’ll take a guess: That’s the way the writers for the tech magazines learned it first.
Whatever the reason, the hard-coded signature method makes sense and does seem easier. If other readers know of a down side to hard-coded signatures, or otherwise have feelings about this issue, I hope they will e-mail me .
I tested the hard-coded signature with the example in the original tip, and it worked fine. I was able to add more exports to the service program without getting signature level checks.
— Ted
Sponsored By WORKSRIGHT SOFTWARE |
On June 30, 2002,
On July 1, 2002, We have the solution! CASS certify your mailing names and addresses and presort your outgoing mail and save. Our CASS certification software ensures that your address files have valid ZIP Code and address information. Our presort software ensures that you can properly prepare you mail for delivery to your Post Office. WorksRight Software, Inc. is the number-one source for iSeries and AS/400 CASS, presort, ZIP Code, and area code software and data.
Visit our Web site – www.worksright.com – to learn more about our CASS and presorting software, or contact WorksRight Software, Inc., phone 601-856-8337, |