Use this system macro to retrieve or modify control records that are
associated with TPF transaction services processing. This macro is only
used by the transaction manager (TM) and resource managers (RMs).
Through the use of the $RETRC macro, the TM and RMs control the commit scope
environment.
Format
- TYPE
- Defines the type of control record to be acted on. This parameter
is required. The following control record types are valid:
- TMCR
- Requests a transaction manager control record (TMCR).
- CCR
- Requests a commit control record (CCR).
- TMCR=Ry
- A register (R1-R7) used to identify the current TMCR and to contain
the address of the retrieved TMCR. This parameter is required when you
code TYPE=TMCR or ECB=NO.
- STEP
- Specifies the direction to use when retrieving a TMCR. This
parameter is required when you code TYPE=TMCR.
- NEXT
- Retrieve the next TMCR in the chain of TMCRs.
- PREV
- Retrieve the previous TMCR in the chain of TMCRs.
- ECB
- Defines the area to which the TMCR is anchored. This parameter is
required.
- YES
- Specifies that the TMCR is anchored out of the ECB at the CE2TMCR
field.
- NO
- Specifies that the ECB TMCR anchor is not to be used. Instead, the
TMCR address is supplied in the register specified in the TMCR
parameter.
- CCR=Rz
- A register (R1-R7) used to identify the current CCR and to contain
the address of the retrieved CCR. This parameter is required when you
code TYPE=CCR.
- RMID=Rx|equate
- A register (R0-R7) or equate used to define the RMID associated with
the record request. This parameter is required when you code
TYPE=CCR.
- ACTION
- Specifies a modification to the chaining of CCRs. This parameter is
optional. When this parameter is not specified, the CCRs are
retrieved.
- POPCHAIN
- The chain of CCRs is removed from the current resource manager control
record (RMCR) and added to the CCR chain of the previous RMCR; that is,
the chain is popped back to the previous level of nested RMCRs.
POPCHAIN is only valid when you code TYPE=CCR.
Entry Requirements
- When you specify ECB=YES, R9 must contain the address of the ECB being
processed. The current TMCR address is retrieved from ECB field
CE2TMCR.
- When you specify ECB=NO, the register, which is specified by the TMCR
parameter, must contain the address of the current TMCR.
- The register specified on the CCR parameter must contain the
following:
When CCR retrieval is requested (the ACTION parameter is not coded):
- 0 when requesting the first CCR in the chain
- The address of the current CCR when requesting the next CCR in the
chain.
When ACTION=POPCHAIN is specified:
- Is not used for input but will contain the status of the operation upon
return.
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 TMCR parameter will contain the
following.
- When TYPE=TMCR, the register contains:
- The address of the retrieved TMCR.
- 0 when the end of the chain has been reached and nothing more can be
retrieved in the indicated direction.
- -2 when a protocol error has been detected or 0 was passed as the
TMCR address.
- When TYPE=CCR, the register is unchanged.
- The register specified on the CCR parameter contains the following.
- When the ACTION parameter is not coded:
- The address of the retrieved CCR.
- 0 when the end of the chain has been reached and nothing more can be
retrieved.
- -1 when the first CCR is requested and none exists.
- When ACTION=POPCHAIN:
- Unchanged when the requested action is successful.
- -2 when a protocol error has been detected and there is no previous
level to pop the CCR chain back to.
- The register specified on the RMID parameter remains unchanged.
- 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.
Examples
$RETRC TYPE=TMCR,STEP=PREV,TMCR=R1,ECB=YES
$RETRC TYPE=CCR,CCR=R1,RMID=R2,ECB=YES