OPEN - BLDL - LOAD getting the wrong module 
Author Message
 OPEN - BLDL - LOAD getting the wrong module

Hi,

I'm loading a module from a PDS that is in a different DD than the
STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.

This works fine, *except* when a different module of the same name has
been loaded previously out of STEPLIB and that module is marked
RENT/REUS.  Then the LOAD returns a pointer to the module out of
STEPLIB and ignores the fact that I asked for it out of the other DD.

Any idea's on how to get around this?

Rick Plotke

Note that performance is critical (of course).



Sun, 30 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

It is working as designed.  MVS is trying to reuse the module, and it
will do that regardless of the source of the module.  See

http://ppdbooks.pok.ibm.com:80/cgi-bin/bookmgr/bookmgr.cmd/BOOKS/IEA1...


Quote:
>Hi,

>I'm loading a module from a PDS that is in a different DD than the
>STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.

>This works fine, *except* when a different module of the same name has
>been loaded previously out of STEPLIB and that module is marked
>RENT/REUS.  Then the LOAD returns a pointer to the module out of
>STEPLIB and ignores the fact that I asked for it out of the other DD.

>Any idea's on how to get around this?

>Rick Plotke

>Note that performance is critical (of course).

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.



Sun, 30 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module


[Posted and mailed]

:>Hi,

:>I'm loading a module from a PDS that is in a different DD than the
:>STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.

:>This works fine, *except* when a different module of the same name has
:>been loaded previously out of STEPLIB and that module is marked
:>RENT/REUS.  Then the LOAD returns a pointer to the module out of
:>STEPLIB and ignores the fact that I asked for it out of the other DD.

:>Any idea's on how to get around this?

Are you doing a LOAD DE=?

If so, is the module that you are loading also make RENT?

If so, try altering the directory entry (retrieved by BLDL) to unmark the RENT
attribute.

--


Director, Dissen Software, Bar & Grill - Israel



Sun, 30 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

Actually the problem is that a different module of the same name has already
been loaded, regardless of how you tried to locate it. The BLDL and LOAD
services ALWAYS check the job pack queue (i.e. list of modules already
loaded) first.

If they find a module with the correct name - and its re-entrant, then you
get a pointer to the in storage copy. If the module is not re-entrant (and
the module was not loaded by your task) your task will wait until the task
that did load it either terminates, or issues a DELETE macro for it.

There are a very limited number of ways around this. If "your" version of
the module is compatible with the one that is already loaded you can
conspire to concatenate your library ahead of the other guy's STEPLIB, but
otherwise you are pretty much out of luck.

Quote:

>Hi,

>I'm loading a module from a PDS that is in a different DD than the
>STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.

>This works fine, *except* when a different module of the same name has
>been loaded previously out of STEPLIB and that module is marked
>RENT/REUS.  Then the LOAD returns a pointer to the module out of
>STEPLIB and ignores the fact that I asked for it out of the other DD.

>Any idea's on how to get around this?



Sun, 30 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module



Quote:


>:>I'm loading a module from a PDS that is in a different DD than the
>:>STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.
>:>This works fine, *except* when a different module of the same name has
>:>been loaded previously out of STEPLIB and that module is marked
>:>RENT/REUS.  Then the LOAD returns a pointer to the module out of
>:>STEPLIB and ignores the fact that I asked for it out of the other DD.
>Are you doing a LOAD DE=?
>If so, is the module that you are loading also marked RENT?
>If so, try altering the directory entry (retrieved by BLDL) to unmark the
>RENT attribute.

I don't think that this would work: the RENT (or REUS) that's important is
not the attribute of the module you're loading, it's the attribute of the
module already in the JPAQ.  

One thing you could try though, is change the module name in the DE before
you issue LOAD DE= (changing the 1st byte of the name to lowercase would
suffice).  I think this would work as long as the loadlib is not
authorized.

There is another solution that requires authorization: create a 2nd JPAQ
by issuing ATTACH JSTCB=YES and issue LOAD under the new JSTCB.  

Gilbert Saint-flour



Sun, 30 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

I haven't tried it, but it might work to LOAD an alias.

Quote:

>Hi,

>I'm loading a module from a PDS that is in a different DD than the
>STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.

>This works fine, *except* when a different module of the same name has
>been loaded previously out of STEPLIB and that module is marked
>RENT/REUS.  Then the LOAD returns a pointer to the module out of
>STEPLIB and ignores the fact that I asked for it out of the other DD.

>Any idea's on how to get around this?

>Rick Plotke

>Note that performance is critical (of course).



Mon, 31 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

If you happen to be authorized, a LOAD with ADDR would do it.

Quote:

>Hi,

>I'm loading a module from a PDS that is in a different DD than the
>STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.

>This works fine, *except* when a different module of the same name has
>been loaded previously out of STEPLIB and that module is marked
>RENT/REUS.  Then the LOAD returns a pointer to the module out of
>STEPLIB and ignores the fact that I asked for it out of the other DD.

>Any idea's on how to get around this?

>Rick Plotke

>Note that performance is critical (of course).

Andy Wood



Mon, 31 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

   Here's a dumb question: why not rename your module? Having
two different modules with the same name is certainly a risk.
Is there a good reason why this must be?



Mon, 31 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

I'm creating a Bridging product for IMS.

I have to load the PSB to gather some information and I'm totally at
the whim of the customer site as to what it's name is.  Often it is
the same name as the main program, which is often reentrant.

It's not a risk for the customer to do this as the program and the PSB
always come from different libraries.

Rick Plotke

(See http://www.BridgeIMS.com for a Year2000 solution for large IMS
shops)


Quote:

>   Here's a dumb question: why not rename your module? Having
>two different modules with the same name is certainly a risk.
>Is there a good reason why this must be?



Mon, 31 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

*Thank You* Gilbert Saint-flour!

Changing the name between the BLDL and the LOAD works great.
The BLDL searches the library directory with the real member name,
and then the LOAD uses the changed name to remember the module by in
memory, but picks up the module from where BLDL found it.

Rick Plotke

(See http://www.BridgeIMS.com for a Year2000 solution for large IMS
shops)

Quote:
>>:>I'm loading a module from a PDS that is in a different DD than the
>>:>STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.

>>:>This works fine, *except* when a different module of the same name has
>>:>been loaded previously out of STEPLIB and that module is marked
>>:>RENT/REUS.  Then the LOAD returns a pointer to the module out of
>>:>STEPLIB and ignores the fact that I asked for it out of the other DD.

>>Are you doing a LOAD DE=?
>>If so, is the module that you are loading also marked RENT?
>>If so, try altering the directory entry (retrieved by BLDL) to unmark the
>>RENT attribute.

>I don't think that this would work: the RENT (or REUS) that's important is
>not the attribute of the module you're loading, it's the attribute of the
>module already in the JPAQ.  

>One thing you could try though, is change the module name in the DE before
>you issue LOAD DE= (changing the 1st byte of the name to lowercase would
>suffice).  I think this would work as long as the loadlib is not
>authorized.

>There is another solution that requires authorization: create a 2nd JPAQ
>by issuing ATTACH JSTCB=YES and issue LOAD under the new JSTCB.  

>Gilbert Saint-flour



Mon, 31 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

That behavior may be an integrity exposure.  Sooner or later someone
will APAR that behavior, and close off that method.


Quote:
>*Thank You* Gilbert Saint-flour!

>Changing the name between the BLDL and the LOAD works great.
>The BLDL searches the library directory with the real member name,
>and then the LOAD uses the changed name to remember the module by in
>memory, but picks up the module from where BLDL found it.

>Rick Plotke

>(See http://www.BridgeIMS.com for a Year2000 solution for large IMS
>shops)

>>>:>I'm loading a module from a PDS that is in a different DD than the
>>>:>STEPLIB.  So I do an OPEN of that DD, a BLDL and a LOAD.

>>>:>This works fine, *except* when a different module of the same name has
>>>:>been loaded previously out of STEPLIB and that module is marked
>>>:>RENT/REUS.  Then the LOAD returns a pointer to the module out of
>>>:>STEPLIB and ignores the fact that I asked for it out of the other DD.

>>>Are you doing a LOAD DE=?
>>>If so, is the module that you are loading also marked RENT?
>>>If so, try altering the directory entry (retrieved by BLDL) to unmark the
>>>RENT attribute.

>>I don't think that this would work: the RENT (or REUS) that's important is
>>not the attribute of the module you're loading, it's the attribute of the
>>module already in the JPAQ.  

>>One thing you could try though, is change the module name in the DE before
>>you issue LOAD DE= (changing the 1st byte of the name to lowercase would
>>suffice).  I think this would work as long as the loadlib is not
>>authorized.

>>There is another solution that requires authorization: create a 2nd JPAQ
>>by issuing ATTACH JSTCB=YES and issue LOAD under the new JSTCB.  

>>Gilbert Saint-flour

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.



Mon, 31 Jul 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

Steve, I don't see the integrity exposure in re-naming a
non-authorized load module.

Is it a given that IBM *will* close off that method?

Steve Myers wrote

Quote:
>That behavior may be an integrity exposure.  Sooner or later someone
>will APAR that behavior, and close off that method.

Rick Plotke wrote
Quote:
>>Changing the name between the BLDL and the LOAD works great.
>>The BLDL searches the library directory with the real member name,
>>and then the LOAD uses the changed name to remember the module by in
>>memory, but picks up the module from where BLDL found it.



Tue, 01 Aug 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module



Quote:
>Steve, I don't see the integrity exposure in re-naming a
>non-authorized load module.

There is none, that's why you can't do it if the load-lib is APF
authorized, because, then, there would be an integrity exposure.

Quote:
>Is it a given that IBM *will* close off that method?

Of course not, that's just FUD.




Tue, 01 Aug 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

Quote:

> That behavior may be an integrity exposure.  Sooner or later someone
> will APAR that behavior, and close off that method.

I'm not at all sure whether MVS is supposed to allow you to load two
modules of the same name into the same address space.
--
This space for rent


Thu, 03 Aug 2000 03:00:00 GMT  
 OPEN - BLDL - LOAD getting the wrong module

I think you can load two non-reusable, non-reentrant modules with the same
name into separate tasks.  I think I'll try that tomorrow at work.


[snip]

Quote:
>I'm not at all sure whether MVS is supposed to allow you to load two
>modules of the same name into the same address space.
>--
>This space for rent

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.



Thu, 03 Aug 2000 03:00:00 GMT  
 
 [ 18 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Module information in load-module

2. return -code error blurb behaves wrong in auto loaded file

3. wrong version of Tk loaded?

4. Tcl_AppInit failed: wrong version of Tcl loaded (7.3): need 6.4

5. Converting data from TPS table to MS SQL 7 table getting wrong values

6. using DBFCDX getting wrong indexes

7. getting wrong answers

8. ImageDraw.text gets colour wrong in PIL for GIF images

9. BUG: lassign gets variable in wrong scope

10. HttpDist - getting errors, What I'm doing wrong

11. C++ gets dynamic redefinition (but does it wrong)

12. Wrong window getting mouse events

 

 
Powered by phpBB® Forum Software