× 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: Gary L Peskin <garyp@xxxxxxxxxxxx>
  • Date: Fri, 07 Aug 1998 12:31:26 -0700
  • Organization: The Firstech Corporation

David --

Thank you for clearing this up!  I think you meant to say, however, that
a call to 'sym1' would call 'new1' (rather than sym2) in programs that
use signature 'OLD'.

I have written some little test programs and you are correct and I was
mistaken.

So, to summarize, the ordinal slots for a service program are assigned
based on the *CURRENT signature.  Ordinal slot 1 from ANY *PRV signature
will map to ordinal slot 1 in the *CURRENT signature.  I had thought
that programs calling ordinal slot 1 using signature 'OLD' would get the
correct routine based on the symbol name in slot 1 within the binder
language FOR THAT SIGNATURE but I see that I was wrong.  I guess the
only purpose for putting the EXPORTS in a *PREV block is to allow the
system to generate the correct signature in those cases where you do not
explicitly specify a signature.  If you DO explicitly specify a
signature, those old EXPORT statements aren't even used, it seems.

NOW I see what Nelson was talking about originally.  So, to answer the
question, YES, it does seem to me too like this is backward.

Once again, the list comes through!

Gary

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

Follow-Ups:
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.