Previous Topic: SQL_STATUS (SQS)Next Topic: Process Types (PROC_TYPE) Description


SQL_STATUS_CURRENT (SQC)

This table describes the current status of all active SQL transactions.

Note: For information about how to use the SQC table to cancel SQL requests, see Using SQC Table to Cancel SQL Requests.

Column Name

SQL Data Type

Nullable

Description

ACCESSOR_ID

CHAR(18)

No

Shows the accessor identifier.

CMD_TYPE

CHAR(12)

No

Shows the type of request.

DB_TBL_NAME

 

CHAR(3)

No

Shows the CA Datacom/DB table name. For temporary tables, this is TTM.

DBID

 

SMALLINT

No

Lists the database ID. For temporary tables, this is the temporary table DBID.

EXEC_CNT

 

INTEGER

No

Lists the number of times a process has been executed. Zero indicates a process has not started. One indicates a process has started and may have been completed. More than one indicates multiple rows joined to an inner table of a nested loop join or multiple executions of a correlated subquery. See DML Execution (Query Level).

JOB_NAME

CHAR(8)

No

Shows the job name.

LUW_BEG_REQ_NBR

 

INTEGER

No

Shows the request number of the first request for the LUW. Only cursors can have a prior request number. All other statements are executed in a single MUF request.

MUF_NAME

CHAR(8)

No

Logical name for this MUF.

PLAN_AUTH

CHAR(18)

No

Lists the authorization ID of plan.

PLAN_NAME

CHAR(18)

No

Shows the plan name.

PROC_STEP

 

SMALLINT

No

Lists the process step number within query block. Steps are numbered by 100 per table. For example, a query that reads a single table and uses a sort for ORDER BY might have process steps 101, 102, and 103 for the base table and 201 for the sort.

PROC_TYPE

 

CHAR(32)

No

Lists the process type. See Process Types (PROC_TYPE) Description.

QRY_LVL

 

SMALLINT

No

Lists the query level. Zero indicates subselect. Levels 1 and greater indicate subqueries.

QRY_NBR

 

SMALLINT

No

Shows the number of the subselect or subquery at the specified level.

ROWS_OUT

 

INTEGER

No

Shows the number of rows that were output from the process step. By subtracting the ROWS_OUT from the previous step, you can determine the number of rows filtered by the process. For example, if the ROWS_OUT for process READ INDEX is 1,000 and the next process RESTRICT INDEX is 100, low-order predicates rejected 900 rows. See Process Types (PROC_TYPE) Description.

RUN_UNIT

 

INTEGER

No

Shows the run unit number (a sequential number assigned to each job using the MUF).

STAMP_CUR

 

TIMESTAMP

No

Shows the timestamp of the cursor to read this table.

STAMP_LAST_REQ

 

TIMESTAMP

No

Shows the timestamp of your request to read this table.

STAMP_LUW_BEG

 

TIMESTAMP

No

Shows the timestamp when current or OPEN request began executing in the MUF.

STMT_ID

 

INTEGER

No

Shows the statement ID.

In CA Datacom mode, statement IDs are assigned in the order they physically appear in the host program in increments of 16, that is, the first statement is 16, the second 32, and so on. For dynamic statements, the first statement is 24, the second 40, and so on. All statements referencing a cursor use the statement ID of the DECLARE statement, except the last three bits specify the cursor command: OPEN=1, FETCH=2, UPDATE=3, DELETE=4, CLOSE=5, OPEN(with hold)=6. For example, 18 (16 + 2) is a FETCH for the first statement.

In DB2 mode, statement IDs are assigned by the host language precompiler. For COBOL and PL/I, the program line number is used.

STMT_TYPE

CHAR(12)

No

Lists the statement type.

TBL_NBR

 

SMALLINT

No

Shows the position of the table in the FROM clause. The first table is TBL_NBR 0. Temporary tables are numbered following the tables in the FROM clause.

TERM_ID

 

CHAR(4)

No

Lists the terminal ID if online. Shows blanks if batch.

TSK_NBR

 

SMALLINT

No

Shows the RWTSA in which a process is currently executing. Zero indicates an open cursor which is not currently executing in the MUF.