Dr. Stephen Fedtke wrote:
>when there is a need to determine the TCBSENV (TCB ACEE) in charge for a
given RACHECK call, determining it for the current TCB is quite easy:
>L R14,PSATOLD-FLC(0,0) LOAD CURRENT TASK CONTRO
>ICM R15,B'1111',TCBSENV-TCB(R14)
>BNZ tcbacee_given
>my question:
>1) does racf only honor the TCBSENV of the current task, or is there a need
to check the entire TCB tree above, means checking the TCBSENV field of the
mother tcb, and its mother ... in order to identify any non-zero TCBSENV field?
>2) is there a risk for an infinite loop in the tcb-mother-child structure by
>just
looping until TCBOTC = 0?
As documented in 'RACROUTE Macro Reference':
'If no ACEE is specified, RACF uses the TASK ACEE pointer (TCBSENV) in the
extended TCB. If the TASK ACEE pointer is zero, RACF uses the main ACEE.
The main ACEE's address is in the ASXBSENV field in the address space
extension block.'
So, you use the TCBSENV. If zero, you use then ASXBSENV. If all are zeroes,
you are out of luck and need to handle this error condition.
See this working snippage (shortened for posting):
L R4,PSATOLD CHECK FOR ACEE OFF OF TCB
USING TCB,R4 TASK CONTROL BLOCK
ICM R10,15,TCBSENV IS ACEE OFF OF TCB? MASK=B'1111'
BNZ GETID YES..GO TO FETCH ID FROM ACEE
*
L R5,PSAAOLD CHECK FOR ACEE OFF ASCB
USING ASCB,R5 ADDRESS SPACE CONTROL BLOCK
L R6,ASCBASXB ADDRESS SPACE EXTENSION CONTROLBLOCK
USING ASXB,R6 ADDRESS SPACE EXTENSION BLOCK
ICM R10,15,ASXBSENV IS ACEE OFF ASXB? MASK=B'1111'
BZ RETURN NO ACEE AVAILABLE
*
GETID USING ACEE,R10 ACESSOR ENVIRONMENT ELEMENT
HTH!
Groete / Greetings
Elardus Engelbrecht
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html