For a given ASID, look at OUCB +B0.  JES2, STC or TSO should appear.

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Seymour J Metz
Sent: Thursday, August 8, 2024 9:20 AM
To: [email protected]
Subject: [EXTERNAL] Re: Couple of questions about job id

CAUTION! This email originated outside of the organization. Please do not open 
attachments or click links from an unknown or suspicious origin.

======================================================================
I vaguely recall a job type field, but I don't remember what control block it 
was in.

--
Shmuel (Seymour J.) Metz
https://urldefense.com/v3/__http://mason.gmu.edu/*smetz3__;fg!!AQegZw!cwc7-V-T7ZupjvEHCwfR83MZnWM6zNCsRhsDUFZf1pJQARE80S8lxObSZqkmsGGzotoZB-AexAk$
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר



________________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Peter Relson <[email protected]>
Sent: Thursday, August 8, 2024 8:54 AM
To: [email protected]
Subject: Re: Couple of questions about job id

Colin P wrote
<snip>
char *pJBNI;
char *pJBNS;
pJBNI = (char*)*(long*)(plASCB+ASCBJBNI);    //  for jobs
pJBNS = (char*)*(long*)(plASCB+ASCBJBNS); // for started tasks #define ASCBJBNI 
 172L #define ASCBJBNS  176L

One or the  other will be zero
</snip>

The last line is not true as written. For example, within an initiator when a 
job is running, neither is zero.

If you're writing product code be aware that as an address space terminates the 
storage pointed to by ASCBJBNS / ASCBJBNI (which is within a CSCB mapped by 
IEECHAIN, hence the references to CHTRKID in other posts) gets freemained so 
that you might have to be prepared to blow up if using the pointer to look (if 
it's "your" ASCB, no problem). You might instead consider ASSBJBNS / ASSBJBNI 
which are not pointers, rather are the 8-byte values themselves (or x'00' in 
the first byte indicating not available), since you can serialize against that 
storage being freed by having the CPU lock, then verifying that the ASCB is 
valid via LOCASCSB, and checking that ASCBFAIL is not on. If all is fine, then 
the ASCB/ASSB cannot be freed until you release the CPU lock.

Peter Relson
z/OS Core Technology Design


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to