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



Good explanation. Thanks Mark.

On Fri, Aug 12, 2016 at 3:14 PM, Mark Murphy/STAR BASE Consulting Inc. <
mmurphy@xxxxxxxxxxxxxxx> wrote:

This is not really correct. There is only one set of procedures in a
service program, the current one. *PRV allows you to store additional
signatures, but it is up to you to make sure that changes to the procedures
are not incompatible with the calls the existing programs are making. A
service program can be viewed as a collection of procedures with a
directory used during the bind step. When the service program is created,
the procedures are dropped into slots, and the directory is written with
references from a procedure name to a slot. So ProcA goes to slot 1, ProcB
goes to slot 2, and ProcC goes to slot 3 for the following binding source:

STRPGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(ProcA)
EXPORT SYMBOL(ProcB)
EXPORT SYMBOL(ProcC)
ENDPGMEXP
STRPGMEXP PGMLVL(*PRV)
EXPORT SYMBOL(ProcA)
EXPORT SYMBOL(ProcB)
ENDPGMEXP

When a program is bound to the service program, the binder looks up the
procedure in the *CURRENT block, and stores the slot number in the program.
When the program runs, instead of trying to resolve ProcB in the service
program, it makes sure the signature it knows about is still in the service
program, and then just goes straight to slot 2 and calls whatever procedure
is there. If the procedure in slot 2 is not the same procedure, then
unexpected, but predictable things can happen. Note building the service
program is always done based on *CURRENT. *PRV is just there to provide
additional signatures, and also to document (in the binder source only)
what exports existed and their order at previous incarnations of the
service program. Also parameters must remain compatible between the
existing callers and any changes made to a procedure. That means that most
changes to parameters are bad, but you can add *nopass, parameters to the
end of the parameter list, and you may be abl
e to add *nopass and *omit to existing parameters without harming
existing calls. There may be other adjustments you can make, just be
careful. You can not remove a procedure, or in most cases reorder
procedures without taking additional steps to ensure compatibility. For
example to adjust the parameters on a procedure you could "move" it to the
end of the export list, and insert in it's place a shim to map from the old
call to the procedure with the new procedure interface. The existing
callers will not know the difference and keep calling into slot '2' of the
service program. Newly bound programs will then pick up the new procedure,
and eventually the old export will cease being called. You still can't
remove the old shim though as that would slide everything beyond the shim
up one slot, and the world will have to be recompiled.

There were many discussions here about signatures, and the fact that
signatures buy you nothing but the requirement to keep all those old *PRV
blocks in your binder source. I just use a single manually keyed signature,
and follow the same precautions that you have to follow anyway, and I have
no problems with signatures. In addition to having to maintain all the *PRV
blocks, using generated signatures also adds to the confusion about service
programs, because some folks may start believing that those *PRV blocks
mean something more than they do. In fact they are little more than
comments. In fact, If you added a manual signature to the *PRV block, I
suspect that you could simply remove all the export lines from those *PRV
blocks with no negative repercussions.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----Michael Ryan <michaelrtr@xxxxxxxxx> wrote: -----
To: "RPG programming on the IBM i (AS/400 and iSeries)" <
rpg400-l@xxxxxxxxxxxx>
From: Michael Ryan <michaelrtr@xxxxxxxxx>
Date: 08/12/2016 01:17PM
Subject: Re: Need help with a service program


It's generated when it was *CURRENT. Then the new *CURRENT causes a new
signature to be generated. The *PRV (and all the other *PRVs) are stored in
the service program. So when a program is created using a specific version
of a service program, the *CURRENT signature is stored in the program. That
way the program 'knows' what version level of the procedures to use.

On Fri, Aug 12, 2016 at 1:13 PM, John R. Smith, Jr. <
smith5646midrange@xxxxxxxxx> wrote:

There are other exports and there are differences between *CURRENT and
*PRV
but they are about 10 years old. I only posted the top two exports
because
it is the SCGETNVP that is begin called.

So, backing up a step, we use auto generated signatures. Where does *PRV
get the old signatures?

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
dlclark@xxxxxxxxxxxxxxxx
Sent: Friday, August 12, 2016 1:06 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
<rpg400-l@xxxxxxxxxxxx>
Subject: RE: Need help with a service program

"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 08/12/2016 01:00:18
PM:
Are you saying every time we make a change that affects the signature
we have to display the current service program to find its signature
and
hard
code it in the source?

Possibly not. We just don't use a generated signature. We code
our
own signature for the *CURRENT level so we always know what to put in the
*PRV levels. It is possible that if you actually had a different number
of
exported procedures in your *CURRENT export list that your service
program
would retain the generated signature for the *PRV export list. What I
think
is happening to you is that the generated signature for both export lists
match so only one signature is being retained. But, I'm not sure because
we
have never used generated signatures.

Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331




************************************************************
****************
*****************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately
notify the sender and delete and destroy the message and all copies. All
unauthorized direct or indirect use or disclosure of this message is
strictly prohibited. No right to confidentiality or privilege is waived
or
lost by any error in transmission.
************************************************************
****************
*****************
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To
subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


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.