Use this system macro to get one of the control records associated with TPF
transaction services processing. The $GETRC macro is only for use by
the transaction manager (TM) and resource managers (RMs). Through the
use of the $GETRC macro, the TM and RMs are able to define and control the
commit scope environment.
Format
- TYPE
- Defines the type of control record requested. This parameter is
required. The following control record types are valid:
- TMCR
- Requests a transaction manager control record (TMCR). A new TMCR is
retrieved and chained to the previous one. The previous TMCR is
pushed.
- RMCR
- Requests a resource manager control record (RMCR). This parameter
returns a pointer to an RMCR associated with the current TMCR. It does
not retrieve a new RMCR.
- CCR
- Requests a commit control record (CCR). A new CCR is retrieved and
chained to the previous one.
- TID=Rx
- A register (R1 through R7) containing a pointer to the transaction ID
(TID) to be associated with this request. This parameter is required
when TMCR is coded.
- CR=Ry
- A register (R1 through R7) to contain the address of the retrieved control
record. This parameter is required.
- RMID=Rx
- A register (R0 through R7) containing the resource manager ID (RMID)
associated with the record request. This parameter is required when the
RMCR or CCR record type is coded.
- Note:
- An equate can be specified when you specify TYPE=RMCR.
- ECB
- Defines the area to which the TMCR is anchored. This parameter is
required when the RMCR or CCR record type is coded.
- YES
- Specifies that the TMCR is anchored out of the ECB at the CE2TMCR field
and out of the transaction anchor table (TANC).
- NO
- Specifies that the ECB TMCR anchor is not to be used. Instead, the
TMCR address is supplied in the register specified in the CR parameter.
The TMCR is still anchored to the TANC.
Entry Requirements
- When you specify ECB=YES, R9 must contain the address of the ECB being
processed. Control records are anchored off of the ECB through the
CE2TMCR field. The $GETRC macro uses and updates this field.
- When you specify ECB=NO, the register, which is specified by the CR
parameter, must contain the address of the current TMCR.
Return Conditions
- Control is returned to the next sequential instruction.
- The contents of the registers are preserved across this macro call with
the exception of the registers specified by the macro parameters. The
contents of these registers are as follows:
- The register specified on the CR parameter will contain the address of the
requested record.
- The register specified on the RMID or TID parameters remains
unchanged.
- When you specify the TMCR record type, the TMCR control fields are set by
the macro and all other fields are cleared. Each RMCR entry is also
cleared. If this is a root TMCR, it is also anchored off the
TANC. Additionally, ECB field CE2TMCR is updated to point to the new
TMCR.
- The condition code (CC) is not preserved across the macro call.
Programming Considerations
- This macro can be run from any I-stream.
- This macro can only be called from control program (CP) code.
- When getting an RMCR, the RM is responsible for initializing the following
fields defined in IRMCR(ICRCR):
- IRM_XID
- IRM_STA
- IRM_SIZE.
Examples
$GETRC TYPE=TMCR,CR=R6,TID=R2
$GETRC TYPE=RMCR,CR=R1,RMID=R6,ECB=YES
.
$GETRC TYPE=CCR,CR=R1,RMID=R6,ECB=YES
.
.