IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ADDRESS TSO CALL to invoke a module


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
@shim

New User


Joined: 28 Oct 2021
Posts: 12
Location: India

PostPosted: Mon Jan 06, 2025 10:05 pm
Reply with quote

Hello,

I am invoking a REXX exec through a COBOL program via IRXJCL. In the REXX exec, I have the following CALL coded to run MYPGM.

Every time, the exec gets invoked, the MYPGM gets loaded from STEPLIB. Is there a way, that MYPGM will get Loaded ONCE and for the sub sequent calls it will use the already loaded module. If you could provide any direction or suggestions that would be of great help. Thank you in advance. Please note that I have to keep this chain as it is as part of an existing application COBOL --> IRXJCL --> REXX EXEC

"CALL *(MYPGM)" parm
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1353
Location: Bamberg, Germany

PostPosted: Mon Jan 06, 2025 10:09 pm
Reply with quote

Ask your Sysprogs if there's any chance to put your MYPGM into LLA.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2600
Location: Silicon Valley

PostPosted: Tue Jan 07, 2025 12:12 am
Reply with quote

I do not know what you need to do from Cobol, but MYPGM needs to be written to be reentrant. And needs to be link-edited to be reentrant (and maybe reusable) so that the system can know that it does not need to load a new copy.

And it probably needs those attributes to be in LLA.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 743
Location: Denmark

PostPosted: Tue Jan 07, 2025 1:05 am
Reply with quote

If MYPGM is assembler and reentrant, or at least serially reusable, then there is a technique with which the program can load itself and so bump the use count, which will make the module stay in storage. I have a macro for that.
Or you could copy the module to a VIO dataset and put that in STEPLIB, which will speed up load.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2600
Location: Silicon Valley

PostPosted: Tue Jan 07, 2025 7:18 am
Reply with quote

re: program can load itself

Brilliant!
Back to top
View user's profile Send private message
@shim

New User


Joined: 28 Oct 2021
Posts: 12
Location: India

PostPosted: Tue Jan 07, 2025 2:29 pm
Reply with quote

Thank you Joerg, Pedro & Willy for your response. Yes the module is Reentrant. I am checking with system people if it can be put in LLA.

This is for my understanding, whenever the CALL gets executed in REXX, by default after the CALL the module will be deleted from the storage? In this application, I have one assembler module which gets invoked at the start, if I do a just LOAD EP=MYPGM, can MYPGM be still there in the memory, when the REXX will get control not sure how it will know as we are not passing any load-point address to REXX.

Code:
"ADDRESS TSO"
"CALL *(MYPGM)" parm


Thank you !!
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 743
Location: Denmark

PostPosted: Tue Jan 07, 2025 3:29 pm
Reply with quote

Yes, when a CALL has finished then the module will be gone. It is my understanding that modules are ATTACHed. If running authorized then you can do an ATTACH for the jobstep TCB, but that has other implications, not least the authorization issue. A while back I did look briefly at preloading modules, but could not find an easy solution, so dropped the idea. Would love to hear about a possible solution, though.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 743
Location: Denmark

PostPosted: Tue Jan 07, 2025 3:34 pm
Reply with quote

Should have said 'when a CALL has finished and the module is not in the LPA'. Remember that modules in linklist still have to be located and loaded, though they will benefit from LLA caching, if LLA is active. Only LPA modules are truly resident.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Error to invoke MPP program through B... IMS DB/DC 4
No new posts Call an hlasm from REXX in batch and ... CLIST & REXX 4
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
Search our Forums:

Back to Top