Re: Equivalent of TSOLIB for batch (job library search & JSTCB)

2023-07-19 Thread Michael Stein
On Tue, Jul 18, 2023 at 06:49:26PM +0300, Binyamin Dissen wrote:
> I am trying to do the equivalent of TSOLIB for BATCH, i.e., dynamically adding
> loadlibs. I do not have spare parent tasks that I can hang a JLB DCB.

> Does reaching TCBJSTCB stop the search of the JLBs?

from MVS3.8 source of IEAVLK01

*3. IN PERFORMING THE LINKAGE A SPECIFIC ORDER IS FOLLOWED
*   IN SEARCHING FOR AND DETERMINING THE LOAD MODULE TO  
*   WHICH LINKAGE IS DESIRED.
*  A. THE CONTENTS DIRECTORY ENTRIES (CDES) FOR LOAD 
* MODULES CONTAINED IN THE JOB PACK AREA ARE 
* SEARCHED FOR AN ENTRY CONTAINING THE SPECIFIED 
* ENTRY POINT NAME (IN IEAVLK00).
*  B. IF THE DCB OPERAND WAS WRITTEN IN THE MACRO
* INSTRUCTION, THE SPECIFIED LIBRARY IS SEARCHED 
* ( IN IEAVLK01).
*  C. IF THE DCB OPERAND WAS OMITTED IN THE MACRO
* INSTRUCTION, THE JOB LIBRARIES FOR ASCENDING   
* ORIGINATING TCB'S (IF JOB LIBS EXIST) ARE SEARCHED
* UNTIL THE JOBSTEP TCB'S JOBLIB IS SEARCHED (IN   
* IEAVLK01)
*  D. THE CONTENTS DIRECTORY ENTRIES FOR LOAD MODULES   
* CONTAINED IN THE ACTIVE LINK PACK AREA ARE SEARCHED 
* FOR AN ENTRY CONTAINING THE SPECIFIED ENTRY POINT   
* NAME, VIA CDSEARCH IN IEAVLK00.
*  E. THE PAGEABLE LINK PACK AREA IS SEARCHED VIA
* IEAVVMSR IN IEAVLK00.  
*  F. THE LINK LIBRARY IS SEARCHED IN IEAVLK01. 

code from IEAVLK01:

STEPUP   C R1,TCBJSTCB Q.JOB STEP TCB HANDLED  
 BECDFILIN YES SEARCH LPAQ
 L R1,TCBMOTH(R1)  STEP UP TCB CHAIN 
 SPACE 1
*  SINCE THE DCB ADDRESS IS PROPOGATED DOWNWARD, A ZERO ADDRESS 
*MEANS THAT THERE ARE NO MORE LIBS TO SEARCH.  
 SPACE 2  
*/* P SET DCBREG = TASKLIB DCB OF NEW TCB (R10= TCBJLB)*/
*/* D (YES,CDFILIN,NO,) DCB FIELD = 0? (R10=0) */   
 SPACE 2   
 ICM   DCBREG,MASK4,TCBJLBDI(R1) TEST FOR ZERO ADDR AND PICK 
*  UP NEXT DCB POINTER  
 BZCDFILIN NONE LEFT TO CHECK  
 SPACE 2  
*/* D (YES,STEPUP,NO,) DCB ALREADY CHECKED (R10= WKDCBSE) */ 
 SPACE 2
 C DCBREG,WKDCBSE  SAME AS LAST ONE DONE   
 BESTEPUP  IF SO GET NEXT

What are dsects for?:

 IKJTCB 
TCBJLBDI EQU   TCBJLB-TCB  DISPLACEMENT IN TCB OF DCB ADR. 
TCBMOTH  EQU   TCBOTC-TCB  DISPLACEMENT IN TCB OF MOTHER  
TCBJSEZ  EQU   TCBJPQ-TCB  OFFSET TO JPAQ
TASKLIB  EQU   TCBJLB-TCB  TASKLIB DCB FIELD IN TCB 
TASKSTEP EQU   TCBJSTCA-TCBEQUATE FOR JSTCB

 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Equivalent of TSOLIB for batch (job library search & JSTCB)

2023-07-19 Thread Paul Gilmartin
On Wed, 19 Jul 2023 12:15:10 -0700, Michael Stein wrote:

>
>> Does reaching TCBJSTCB stop the search of the JLBs?
>
>from MVS3.8 source of IEAVLK01
> 
Are comments in the source of 3.8 the best available documentation?

>*...
>*  A. THE CONTENTS DIRECTORY ENTRIES (CDES) FOR LOAD
>* MODULES CONTAINED IN THE JOB PACK AREA ARE
>* SEARCHED FOR AN ENTRY CONTAINING THE SPECIFIED
>* 
What happens on LINK to a name in JPA, active, and not RENT?

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Equivalent of TSOLIB for batch (job library search & JSTCB)

2023-07-19 Thread Michael Stein
On Wed, Jul 19, 2023 at 02:38:44PM -0500, Paul Gilmartin wrote:
> Are comments in the source of 3.8 the best available documentation?

They might be out of date, but requirements of compatiblity and the cost
to IBM of changes make them somewhat relevant.  They're easily accessible
the other choice being MVT which probably worked the same (for this case).

Or the old MVT/MVS program logic manuals.

> >*...
> >*  A. THE CONTENTS DIRECTORY ENTRIES (CDES) FOR LOAD
> >* MODULES CONTAINED IN THE JOB PACK AREA ARE
> >* SEARCHED FOR AN ENTRY CONTAINING THE SPECIFIED
> >* 
> What happens on LINK to a name in JPA, active, and not RENT?

You don't want to go there...  From memory:

 non-reuseable -> ignored, LINK will go get another copy

 serial reuseable -> LINK will wait until it's not in use

If it's RENT then it will get used if the name matches even if it was
fetched from a private library (at least on MVS SP?).  I had a small
program (non-auth) in linklst which would preload a list of RENT modules
from a private library and then XCTL to a specified target.  This let
me run ISPF with my modules in JPQ without a steplib.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Equivalent of TSOLIB for batch (job library search & JSTCB)

2023-07-20 Thread Binyamin Dissen
On Wed, 19 Jul 2023 12:15:10 -0700 Michael Stein  wrote:

:>*  C. IF THE DCB OPERAND WAS OMITTED IN THE MACRO
:>* INSTRUCTION, THE JOB LIBRARIES FOR ASCENDING   
:>* ORIGINATING TCB'S (IF JOB LIBS EXIST) ARE SEARCHED
:>* UNTIL THE JOBSTEP TCB'S JOBLIB IS SEARCHED (IN   
:>* IEAVLK01)

Thanks.  Search stops at JSTCB.

My approach cannot work.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Equivalent of TSOLIB for batch (job library search & JSTCB

2023-07-20 Thread Peter Relson
Search a z/OS release's publications for Module Search Order and you will find 
this match:

https://www.ibm.com/docs/en/zos/2.5.0?topic=lla-module-search-order

As with many things, there are techniques and subtleties that can affect what 
happens.
For example, you can bypass the search of tasklib(s),steplib/joblib by 
specifying the DCB of the LNKLST.
Some system code does this. Various considerations apply when considering 
whether an already-loaded module of the right name can be used for a subsequent 
request, including authorization and reentrancy (or lack thereof).


Does reaching TCBJSTCB stop the search of the JLBs?

Yes.

Peter Relson
z/OS Core Technology Design


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN