mgo
OS/400 Edition
Volume 2, Number 69 -- September 11, 2002

Adding Subprocedures to a Service Program, Revisited


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,
$$$$$$$$    Postal Rates went UP!    $$$$$$$$

On July 1, 2002,
$$$$$    you wanted your postage bill to go down.    $$$$$

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,
e-mail software@worksright. com .


THIS ISSUE
SPONSORED BY:

Worth Consulting
WorksRight Software


BACK ISSUES

TABLE OF CONTENTS

Excuse Me...Can You Hold this Secondary Partition While I Upgrade the Primary?

Adding Subprocedures to a Service Program, Revisited

Reader Feedback and Insights: Security Flaws


Editors
Howard Arner
Joe Hertvik
Ted Holt
David Morris

Managing Editor
Mari Barrett

Publisher and
Advertising Director

Jenny Thomas

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com



Last Updated: 9/11/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.