× 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 00:15:14 -0400

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
> 
> Nelson Smith wrote:
> >
> > Gary L Peskin wrote:
> >
> > > You say that "To get clean compiles ...".  What happens if you just
> > > change all of the STRPGMEXP commands, except the current one, to specify
> > > PGMLVL(*PRV).  Why doesn't this result in a clean compile?
> > >
> > > Gary
> > >
> > I do that, but it is not enough because the new set of exports is placed
> > at the end of the source member by RTVBNDSRC instead of at the beginning
> > where the compiler requires it.
> >
> > Also, it alphabetizes the exports rather than adding the new exports at
> > the end.  While this will compile OK, it causes mismatches when programs
> > compiled under an earlier signature try to call a procedure which used
> > to be the first export, for example, and now gets a completely different
> > procedure just because RTVBNDSRC moved a new one into export position
> > one. Programs using the service program go by the position of the
> > exports and not the name or size of parameters, etc.
> >
> > I understand how to fix the problem, by moving the new source from the
> > bottom of the source member to the top and by reorganizing the exports
> > to put the new ones at the end. But if you have to do all that there is
> > no point to using the RTVBNDSRC command.  It's easier to do it by hand.
> > My question is am I doing something wrong or is RTVBNDSRC really that
> > badly written?  Or has a PTF been issued to address this problem that I
> > don't know about?
> > --
> > 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
> > +---
> 
> +---
> | 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
> +---

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

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.