Previous Topic: END LINE TERMINAL SESSION (DC/UCF)Next Topic: ENDPAGE (DC/UCF)


END TRANSACTION STATISTICS (DC/UCF)

The END TRANSACTION STATISTICS statement defines the end of a transaction. The transaction typically ends when the issuing task terminates. Optionally, END TRANSACTION STATISTICS can be used to write the transaction statistics block (TSB) to the system log file and to return the TSB to a preallocated location in variable storage. You can define the length of the TSB.

Syntax
►►─── END TRANSACTION STATISTICS ─┬───────────┬───────────────────────────────►
                                  ├─ WRITE ◄ ─┤
                                  └─ NOWRITE ─┘

 ►─┬────────────────────────────────────┬─────────────────────────────────────►
   └─ INTO (return-stat-data-location) ─┘

 ►─┬────────────────────────────┬──────── ; ──────────────────────────────────►◄
   └─ LENGTH= ─┬─ 388 ◄───────┬─┘
               └─ tsb-length ─┘
Parameters
WRITE/NOWRITE

Specifies whether the TSB is written to the system log file when the task terminates.

Default: WRITE

INTO (return-stat-data-location)

Specifies the location to which the system copies the TSB. Return-stat-data-location is the symbolic name of a user-defined field. Return-stat-data-location is a fullword-aligned 388-byte field (you can customize the length using the LENGTH= parameter).

LENGTH=

Specifies the length of the returned TSB . To retrieve all statistics including the DC extended statistics section that records CPU times in the Time of Day (TOD) format, specify LENGTH=560.

tsb-length

Specifies either the symbolic name of a user-defined field that contains the length to be returned, or the length expressed as a numeric constant.

Limits: Integer of 388 or greater

Default: If you do not specify a tsb-length, the first 388 bytes of the TSB are returned.

Example

The following statement ends a transaction, writes statistics to the log file, and returns a copy of the TSB to the STATISTICS_BLOCK field:

END TRANSACTION STATISTICS
  WRITE
  INTO (STATISTICS_BLOCK);
Status Codes

Upon completion of the END TRANSACTION STATISTICS function, the ERROR_STATUS field in the IDMS DC communications block indicates the outcome of the operation:

0000

The request has been serviced successfully.

3801

Storage for the transaction statistics block is not available; to wait would cause a deadlock.

3813

No transaction statistics block exists; a BIND TRANSACTION STATISTICS request has not been issued.

3831

Either the parameter list is invalid or no logical terminal element (LTE) is associated with the issuing task.

3850

The collection of transaction statistics or task statistics has not been enabled during system generation.