STACK option of PCLINK

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Supervisor state, any PSW key
Dispatchable unit mode: Task or SRB
Cross memory mode: Any PASN, any HASN, any SASN
AMODE: 24- or 31-bit
ASC mode: Primary
Interrupt status: Enabled or disabled for I/O and external interrupts
Locks: The caller may hold locks, but is not required to hold any.
Control parameters: None
   

Programming requirements

None.

Restrictions

Your program must not change registers 13-4 between receiving control and the time of issuing PCLINK.

Input register information

Before issuing the STACK option of the PCLINK 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.

Output register information

On completion of PCLINK STACK, the registers are as follows:
Register
Contents
0-1
Unchanged
2
Bits 0-23 contain bits 8-31 from register 2 at the time the PCLINK macro was issued. Bits 24-31 contain the PCLINK caller's PSW key.
3-4
Unchanged
5
Used as a work register by the system
6-7
Unchanged
8-12
Unchanged if SAVE=YES, used as work registers by the system if SAVE=NO
13
Zero, to ensure that the first save area created after the basic PC does not point to a previous save area.
14
Stack token to uniquely identify the stack entry created. This token is required for the UNSTACK and EXTRACT forms of PCLINK.
15
Unchanged

Performance implications

Processing is more efficient if SAVE=NO is specified.

Syntax

The STACK option of the PCLINK macro is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede PCLINK.
   
PCLINK  
   
One or more blanks must follow PCLINK.
   
STACK  
   
   ,INKEY=ZERO  
   
   ,OUTKEY=CALLER Default: OUTKEY=CALLER
   ,OUTKEY=ZERO  
   ,OUTKEY=KEYn n: Any valid PSW key value from 0-F.
   
   ,SAVE=YES Default: SAVE=YES
   ,SAVE=NO  
   
   ,RELATED=value value: Any valid macro keyword specification.
   

Parameters

The parameters are explained as follows:

STACK
Saves some of the environment when a routine gets control as a result of a basic PC instruction.
,INKEY=ZERO
Specifies that the PSW key is zero upon entry to PCLINK. If this parameter is not specified, the PSW key is temporarily changed to zero.
,OUTKEY=CALLER
,OUTKEY=ZERO
,OUTKEY=KEYn
Specifies the setting of the PSW key after the PCLINK macro has completed. Specifying CALLER causes the PSW key to be restored to the value it had on entry. Specifying ZERO sets the PSW key to zero. Specifying a key value indicates a specific value for the key. You may specify any key value from zero to F.
,SAVE=YES
,SAVE=NO
Specifies whether (YES) or not (NO) to preserve registers 8 - 12. The save area used is different from the area addressed by register 13. SAVE=YES is the default.
,RELATED=value
Specifies information used to self-document macros by “relating” functions or services to corresponding services performed elsewhere. The format and contents of the information specified can be any valid coding values.

ABEND codes

052
053

See z/OS MVS System Codes for an explanation and programmer responses for this code.

Return and reason codes

None.