The system identifies an address space through an address space identifier (ASID), an address space control block (ASCB), or a space token (STOKEN). Depending on the MVS™ service you want to use, you might be required to supply an identifier you do not have. For example, you might have the ASID of an address space but need to supply the ASCB. If you have the ASID or STOKEN but need to supply the ASCB, use the LOCASCB macro to return the ASCB address.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state or supervisor state, and any PSW key |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | PASN=HASN=SASN or PASN¬=HASN¬=SASN |
AMODE: | 24- or 31-bit |
ASC mode: | Primary or secondary when you specify the ASID parameter; primary or access register (AR) when you specify STOKEN. |
Interrupt status: | Enabled or disabled for I/O and external interrupts |
Locks: | CMS lock, if you want to be sure that the address space doesn't terminate while the system is referencing the ASCB; otherwise, no requirement. |
Control parameters: | If you specify the ASID parameter, control parameters must be in the primary address space; if you specify the STOKEN parameter, control parameters must be in the primary address space or be in an address/data space that is addressable through a public entry on the caller's dispatchable unit access list (DU-AL). |
None.
None.
Before issuing the LOCASCB macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.
After the caller issues the macro, the system might use some registers as work registers or might change the contents of some registers. When the system returns control to the caller, the contents of these registers are not the same as they were before the caller issued the macro. Therefore, if the caller depends on these registers containing the same value before and after issuing the macro, the caller must save these registers before issuing the macro and restore them after the system returns control.
None.
The standard form of the LOCASCB macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede LOCASCB. |
LOCASCB | |
␢ | One or more blanks must follow LOCASCB. |
ASID=asid addr | asid addr: RX-type address or register (0) - (15). |
STOKEN=stoken addr | stoken addr: RX-type address |
The parameters are explained as follows:
None.
When the LOCASCB macro returns control to your program, GPR 15 contains a hexadecimal return code.
Return Code | Meaning and Action |
---|---|
00 | Meaning: LOCASCB successfully located
and returned the ASCB address. Action: None. |
04 | Meaning: Program error. The ASID or STOKEN
did not map to a valid, active ASCB. This may occur because the input
ASID of STOKEN never was valid, or because the address space it represents
is no longer active. Action: Verify that the input ASID or STOKEN is valid. |
08 | Meaning: Program error. The STOKEN was
not valid. Action: Supply a valid input STOKEN. |
LH 4,ASN
LOCASCB ASID=(4)
ASN DC H'34'
LOCASCB STOKEN=STOKADDR
STOKADDR DS 2F