Thread id using BPX1GTH
For the current TCB, I want to extract the thread id. I'm using BPX1GTH. I'm varying the values for PGTHACCESSID and PGAACCESSTHID. When I get zeros for return value, return code and reason code, the thread id is always 0. I'm wondering if this is the right approach. If it is, what values are needed in PGTHACCESSTHID and PGTHAFLAG1 ? Is a value in PGTHAPROCESSID required ? Thanks in advance, Pierre. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Thread id using BPX1GTH
On Thu, 17 Sep 2020 at 10:21, Pierre Fichaud wrote: > For the current TCB, I want to extract the thread id. > I'm using BPX1GTH. > I don't know about BPX1GTH, but it's trivially easy to go from a TCB address to a thread ID yourself. If you want the current TCB, its address is in PSATOLD. Or maybe you have a TCB address from elsewhere. Either way, then TCBSTCB -> STCB, then STCBOTCB-> OTCB, and there you have OTCBTHID. The mapping macros for the above are IHAPSA, IKJTCB, IHASTCB, and BPXZOTCB. Of course your current TCB may not be dubbed, in which case at least one of the above pointers (presumably STCBOTCB) will be zero. So you should check as you go. Tony H. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Thread id using BPX1GTH
Tonu=y, Yup,I got that from a friend of mine. How about the process id ? It seems that ASSBOASB points to an OCO area. The OMVS address space block contains the thread id. But I can't find a mapping of it. Regards, Pierre. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Thread id using BPX1GTH
On Mon, 21 Sep 2020 at 16:23, Pierre Fichaud wrote: > Tonu=y, > Yup,I got that from a friend of mine. > How about the process id ? > It seems that ASSBOASB points to an OCO area. > The OMVS address space block contains the thread id. > But I can't find a mapping of it. > Regards, Pierre. > Thing is, there can be more than one process and more than one thread in an address space. So the OASB logically can't point to *the* thread id. And the OASB seems to still be OCO. The OAPB (OMVS Address-space Process Block?) is an odd one in that it was at one time OCO, but then got released. (In passing, it seems that the BPXY blocks/macros were always released, and the BPXZ ones were OCO. But there are now four BPXZs in SYS1.MACLIB.) The OAPB has only a small handful of PI fields, but the whole mapping is there in PL/X, and it does contain the field OapbProcessID. The OAPB is pointed to by the OTCB, and presumably directly or indirectly by the OASB. But here you're into unsupported territory, with all the choices that implies. I have various little Rexx programs that go through this stuff on live systems and in dumps, but I wouldn't put them into production for anything. Tony H. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN