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


  • Subject: Re: Binder Language problems
  • From: Nelson Smith <ncsmith@xxxxxxxx>
  • Date: Fri, 07 Aug 1998 22:14:18 -0400

David Morris wrote:
> 
> Nelson & Gary,
> 
> I have found that you cannot change the order of your exports.  In order to 
>allow you to rename an export, IBM decided to use the ordinal position in the 
>*current section to reference *prv exports.  In your example you added 'new1' 
>as the first export like this:
> 
> STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('NEW')
>   EXPORT SYMBOL('new1')
>   EXPORT SYMBOL('sym1')
>   EXPORT SYMBOL('sym2')
> ENDPGMEXP
> STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE('OLD')
>   EXPORT SYMBOL('sym1')
>   EXPORT SYMBOL('sym2')
> ENDPGMEXP
> 
> I have found that would cause a call to 'sym1' to call 'sym2' in programs 
>that use signature 'OLD' because the call is by ordinal position.  The 
>following will work:
> 
> STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('NEW')
>   EXPORT SYMBOL('sym1')
>   EXPORT SYMBOL('sym2')
>   EXPORT SYMBOL('new1')
> ENDPGMEXP
> STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE('OLD')
>   EXPORT SYMBOL('sym1')
>   EXPORT SYMBOL('sym2')
> ENDPGMEXP
> 
> Note that 'new1' is added to the end of *CURRENT.  From what it says in the 
>ILE concepts manual IBM did this to allow renaming of prior versions like:
> 
> STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('NEW')
>   EXPORT SYMBOL('oldsym1')
>   EXPORT SYMBOL('sym2')
>   EXPORT SYMBOL('sym1')
> ENDPGMEXP
> STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) SIGNATURE('OLD')
>   EXPORT SYMBOL('sym1')
>   EXPORT SYMBOL('sym2')
> ENDPGMEXP
> 
> I wish they would have asked me before they did that.  I would have suggested 
>they support explicit renaming of exports in the binding language rather than 
>using the ordinal position to rename exports.
> 
> David Morris
> 
> 
> 
> >>> Gary L Peskin <garyp@firstech.com> 08/07 12:38 AM >>>
> (1) What kind of "create errors" do you get if the new set of exports is
> at the bottom?
> 
> (2) If you do a DSPSRVPGM on your service program, do both sets of
> signatures show up?
> 
> (3) If you do a DSPPGM on your CALLING program and then hit enter until
> it shows the service programs, does the signature shown match the
> ORIGINAL signature of the service program?
> 
> (4) Are you explicitly specifying the LVLCHK or SIGNATURE parameter of
> the STRPGMEXP statement?
> 
> Gary
> 
> Nelson Smith wrote:
> >
> > I'm with you on everything you said below except for two small areas.
> > First, I get create errors when trying to create the service program if
> > I don't move the new set of exports (shown at the bottom of your source)
> > up to the top of the source. Once I move it there, the service program
> > creates fine. However, this may be the source of my second problem.
> >
> > In your next to last paragraph, you said your original program "B"
> > references the first export in the ORIGINAL block of source.  That is
> > not my experience. In my case it references the first export in the NEW
> > block of source which in the example below is a newly added export.
> > Unexpected results occur because the parameters are usually different.
> >
> > Do you have no problem recreating the service program with the binder
> > source shown as below, with the new set of source exports at the end?
> > If not, what am I doing wrong?  What are your parameters set to on the
> > CRTSRVPGM command?
> >
> > Gary L Peskin wrote:
> > >
> > > Nelson --
> > >
> > > I don't mean to be dense here.  But let me give you an example so that
> > > you can explain to me where my misunderstanding is.
> > >
> > > I have a *PGM ("A") which consists of one module ("AM") which I recently
> > > created using the following binder language:
> > >
> > > STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES)
> > >   EXPORT SYMBOL('sym1')
> > >   EXPORT SYMBOL('sym2')
> > > ENDPGMEXP
> > >
> > > After *PGM A is created, I create program B which calls procedure sym1.
> > >
> > > Now, I enhance module AM and add a new entry point, called 'new1'.
> > >
> > > Say I place this procedure before 'sym1' in AM.  By the way, I think the
> > > RTVBNDSRC creates the exports in an order specified by the compiler.
> > > The C compiler places the exported symbols in the same order as they
> > > appear in the program -- don't know about the other compilers.)
> > >
> > > Now, I do a RTVBNDSRC, adding to my previous source.  After the command
> > > runs, I get:
> > >
> > > STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES)
> > >   EXPORT SYMBOL('sym1')
> > >   EXPORT SYMBOL('sym2')
> > > ENDPGMEXP
> > > STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES)
> > >   EXPORT SYMBOL('new1')
> > >   EXPORT SYMBOL('sym1')
> > >   EXPORT SYMBOL('sym2')
> > > ENDPGMEXP
> > >
> > > The first four lines were in my binder source member from before I ran
> > > the RTVBNDSRC command.
> > >
> > > I change the binder source by replacing all but the last *CURRENT to
> > > read *PRV so now the source looks like this:
> > >
> > > STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES)
> > >   EXPORT SYMBOL('sym1')
> > >   EXPORT SYMBOL('sym2')
> > > ENDPGMEXP
> > > STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES)
> > >   EXPORT SYMBOL('new1')
> > >   EXPORT SYMBOL('sym1')
> > >   EXPORT SYMBOL('sym2')
> > > ENDPGMEXP
> > >
> > > Since I haven't explicity specified a signature, the system will create
> > > a different unique signature for each STRPGMEXP .. ENDPGMEXP block.  New
> > > programs which call "A" will use the *CURRENT export block and will have
> > > that signature embedded in them.
> > >
> > > However, my old program "B" will still work, without recreating it,
> > > because "B" references the first slot in the ORIGINAL export block
> > > (which it locates based on the signature still embedded in "B") which is
> > > still 'sym1'.
> > >
> > > Programs compiled under an earlier signature will reference the earlier
> > > signatures exports in that signatures ordinal order.  Are you overriding
> > > the signature or not retaining old signatures?
> > >
> > > Gary
> 
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
Why can't they just use the signature to determine which set of exports
to use?

My experience is the same as you demonstrate above. Yet, the RTVBNDSRC
command creates exactly the problem shown in the first example if the
new procedure happens to fall alphabetically ahead of the previous
procedures.

Also, I note that in each sample above, you do move the new set of
exports to the top.  Do you also get create errors if you leave it at
the bottom where RTVBNDSRC puts it (I realize you use your own command
rather than RTVBNDSRC - I just want to know I'm not crazy!)?
-- 
Nelson Smith
"Standards are Wonderful....cause there's so many to choose from!"
ncsmith@gate.net
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.