If I need to obtain the Space Token for the current address space,
I usually use an ALESERV Macro with the EXTRACTH parameter.
*
Method 1
ALESERV EXTRACTH,STOKEN=ASTOKEN
ASTOKEN DS D
I have seen Older Assembler Code which chains through Control Blocks
PSA -> ASCB -> ASSB
*
Method 2
MODSET MODE=SUP SET SUPERVISOR STATE PSW
USING PSA,R0 Map Prefix Save Area
L R4,PSAAOLD Curent Address Space
USING ASCB,R4 MAP ASCB
L R5,ASCBASSB GET ADDRESS OF Target ASSB
USING ASSB,R5 MAP ASSB
ST R5,ASSB@ Save Target ASSB Address
MVC ASTOKEN,(L'XTOKEN),ASSBSTKN Address Space Token
ASTOKEN DS D
Should there be a difference in the valude of ASTOKEN regardless of the
technique used ?
Is it ever appropriate to use Method 2 anymore to retrieve the SPACE Token for
An Address Space ?
Paul D'Angelo