Control‑M/Tape stores certain basic information (for example, the values specified for Control‑M/Tape installation parameters) in a control block called the Control‑M/Tape Control Table (TCT). User-written APIs require access to the TCT in order to determine certain aspects of the Control‑M/Tape environment.
The TCT is mapped by macro CTTTCT.
Note: The TCT, and all other major Control‑M/Tape control blocks, are allocated above the 16MB line. Therefore, all programs using the Control‑M/Tape API must run in extended addressing mode (AMODE 31).
The following table describes two types of TCTs that are used by Control‑M/Tape APIs:
Table 242 Types of TCTs Used by Control-M/Tape APIs
Type |
Description |
---|---|
Local TCT |
A control block containing the values specified for Control‑M/Tape installation parameters. A local TCT is used by base level APIs. Programs that use the Base level API call a Control‑M/Tape routine that creates a local TCT for use by that API. A local TCT can be created regardless of whether Control‑M/Tape is active. For more information about how to create a local TCT, see below. |
Real-Time TCT |
A control block containing information about the Control‑M/Tape real‑time environment. The Real-Time TCT contains all information that appears in a local TCT and, in addition, it contains information generated during Control‑M/Tape initialization (for example, rule tables addresses and for user exits). The Real-Time TCT is used by the high level API and the Rule Search API. The high level API uses its own internal method to access the TCT. The Rule Search API requires the address of the Real-Time TCT. This address is obtained using the CTTGTCT macro. For more information, see Obtaining the Address of the Real-Time TCT. The Real-Time TCT is available only when Control‑M/Tape is active. It is built by Control‑M/Tape during initialization and is kept in E/CSA storage. |
Creating a Local TCT
A local TCT must be created for each program that uses the Base-Level API. This task is performed using routine CTTTLD that is called from a user-written program.
Use the following call to invoke routine CTTTLD:
CALL CTTTLD,(func-addr, tct-addr, 0, 0) |
where
Note: The job step used to run the CTTTLD routine must include a DD statement, DAPARM, that references the IOA PARM and IOA IOAENV libraries. If the IOA LOAD library is not part of the LINKLIST, add it using a STEPLIB DD statement.
Return Codes
Routine CTTTLD returns one of the following return codes in general register 15:
Table 243 Return Codes for Routine CTTTLD
Code |
Description |
---|---|
0 |
Local TCT created successfully |
4 |
Invalid function |
8 |
TCT could not be created |
12 |
GETMAIN failed |
Sample TCT Load Request
The following sample demonstrates a load request call to routine CTTTLD that creates a copy of the local TCT:
Figure 81 Sample TCT Load Request
CALL CTTTLD,(LOADENV,TCTADDR,0,0) Load the TCT
LTR R15,R15 Successful ?
BNZ TCTFAIL No - Terminate
L R12,TCTADDR
USING TCT,R12
.
.
TCTFAIL WTO ‘TCT LOAD FAILED, PROGRAM TERMINATED’
.
LOADENV DC CL8’LOADENV’ Constant for CTTTLD
TCTADDR DS A Address of TCT
.
TCT DSECT
COPY CTTTCT TCT mapping
Parent Topic |