Address Space STOKEN

219 views
Skip to first unread message

ess...@juno.com

unread,
Nov 24, 2012, 4:52:08 PM11/24/12
to ASSEMBL...@listserv.uga.edu
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

Binyamin Dissen

unread,
Nov 24, 2012, 5:42:25 PM11/24/12
to ASSEMBL...@listserv.uga.edu
On Sat, 24 Nov 2012 21:52:08 GMT "ess...@juno.com" <ess...@juno.com> wrote:

:>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 ?

Home A/S? No.

:>Is it ever appropriate to use Method 2 anymore to retrieve the SPACE Token for An Address Space ?

Does anyone still use EXTRACT FIELDS=(TIOT)

--
Binyamin Dissen <bdi...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

Peter Relson

unread,
Nov 25, 2012, 9:17:34 AM11/25/12
to ASSEMBL...@listserv.uga.edu
>Is it ever appropriate to use Method 2 anymore to
>retrieve the SPACE Token for An Address Space ?

Wrong question.

Right question: Is it ever appropriate to use Method 1?

Answer: No. It will work fine but it is far less efficient than Method 2.

In both cases shown you are extracting the STOKEN of the home address
space. That is a safe operation.
There is danger in extracting, without proper serialization, the STOKEN of
any address space that is not your home, not your primary, not your
secondary address space.

Peter Relson
z/OS Core Technology Design

ess...@juno.com

unread,
Nov 25, 2012, 10:24:35 AM11/25/12
to ASSEMBL...@listserv.uga.edu
Peter Relson wrote
>There is danger in extracting, without proper serialization, the STOKEN of
>any address space that is not your home, not your primary, not your
>secondary address space.

From the code that I ave seen, btaining the SPACE Token was Always In the HOME=PRIMARY=SECONDARY Address Space.

As For serialization do You mean the LOCAL LOCK ?

Paul D'Angelo

Peter Relson

unread,
Nov 26, 2012, 7:40:12 AM11/26/12
to ASSEMBL...@listserv.uga.edu
>As For serialization do You mean the LOCAL LOCK ?

No, I do not. I refer to serialization that will prevent the ASCB / ASSB
from being freemained if the corresponding address space terminates

That serialization is one of the following
-- CMS lock (with any local lock)
-- DISP lock (not a programming interface)
-- Disablement, but only if you have stayed disabled from the time that
you picked up the ASCB address, through the time that you validated with
LOCASCB (or something else) that that ASCB is still valid, through
accessing ASCBASSB and ASSBSTKN.
Reply all
Reply to author
Forward
0 new messages