Previous Topic: ACCEPT PAGE-INFONext Topic: BIND PROCEDURE


ACCEPT STATISTICS

Purpose

Returns runtime database statistics to the dialog.

Syntax

►►──── ACCept ─┬─ STATISTICS ─┬── into db-statistics-variable ────────────────►
               └─ STATS ──────┘

 ►─── FROM IDMS-STATISTICS ────────┬─────────────────────────────┬─── . ──────►◄
                                   └─ EXTENDED db-stat-extended ─┘

Parameters

ACCept STATISTICS

Introduces the variable data field to which the database key of the object record is moved.

STATS can be used in place of STATISTICS.

into db-statistics-variable

The name of the location in the dialog's record buffers where the runtime statistics contained in the CA IDMS statistics block are to be moved.

A fullword aligned, 100-byte system supplied statistics block shown below:

01 DB-STATISTICS
  03 DATE-TODAY                   PIC X(8).
  03 TIME-TODAY                   PIC X(8).
  03 PAGES-READ                   PIC S9(8)   COMP.
  03 PAGES-WRITTEN                PIC S9(8)   COMP.
  03 PAGES-REQUESTED              PIC S9(8)   COMP.
  03 CALC-TARGET                  PIC S9(8)   COMP.
  03 CALC-OVERFLOW                PIC S9(8)   COMP.
  03 VIA-TARGET                   PIC S9(8)   COMP.
  03 VIA-OVERFLOW                 PIC S9(8)   COMP.
  03 LINES-REQUESTED              PIC S9(8)   COMP.
  03 RECS-CURRENT                 PIC S9(8)   COMP.
  03 CALLS-TO-IDMS                PIC S9(8)   COMP.
  03 FRAGMENTS-STORED             PIC S9(8)   COMP.
  03 RECS-RELOCATED               PIC S9(8)   COMP.
  03 LOCKS-REQUESTED              PIC S9(8)   COMP.
  03 SEL-LOCKS-HELD               PIC S9(8)   COMP.
  03 UPD-LOCKS-HELD               PIC S9(8)   COMP.
  03 RUN-UNIT-ID                  PIC S9(8)   COMP.
  03 TASK-ID                      PIC S9(8)   COMP.
  03 LOCAL-ID                     PIC X(8).
  03 FILLER                       PIC X(8).

Note: Record DB-STATISTICS is defined in the dictionary when CA IDMS is installed and can be included as a dialog work record. For more information about the CA IDMS statistics block, see the CA IDMS Database Administration Guide.

The LOCAL-ID field consists of the 4-byte identifier of the interface in which the run unit originated (in CA ADS, it is always DBDC) and a unique identifier (a fullword binary value) assigned to the run unit by that interface. To display the originating interface identifier and the run-unit identifier, the LOCAL-ID field can be moved to a work field that is defined as follows:

01  WORK-LOCAL-ID
  02  WORK-LOCAL-ORIGIN           PIC X(4).
  02  WORK-LOCAL-NUMBER           PIC S9(8)   COMP.

Alternatively, the DB-STATISTICS record can be modified to define two subordinate fields for the LOCAL-ID field.

into db-stat-extended

The name of the location in the dialog's record buffers where the extended runtime statistics contained in the CA IDMS statistics block are to be moved.

A fullword aligned, 100-byte system supplied statistics block shown below:

01 DB-STAT-EXTENDED
  03 SR8-SPLITS                   PIC S9(8)   COMP.
  03 SR8-SPAWNS                   PIC S9(8)   COMP.
  03 SR8-STORES                   PIC S9(8)   COMP.
  03 SR8-ERASES                   PIC S9(8)   COMP.
  03 SR7-STORES                   PIC S9(8)   COMP.
  03 SR7-ERASES                   PIC S9(8)   COMP.
  03 BINARY-SEARCHES-TOTAL        PIC S9(8)   COMP.
  03 LEVELS-SEARCHED-TOTAL        PIC S9(8)   COMP.
  03 ORPHANS-ADOPTED              PIC S9(8)   COMP.
  03 LEVELS-SEARCHED-BEST         PIC S9(4)   COMP.
  03 LEVELS-SEARCHED-WORST        PIC S9(4)   COMP.
  03 FILLER                       PIC X(60).

Note: Record DB-STAT-EXTENDED is defined in the dictionary when CA IDMS is installed and can be included as a dialog work record. For more information about the CA IDMS statistics block, see the CA IDMS Database Administration Guide.

Usage

Definition

The ACCEPT STATISTICS command is used to move runtime statistics in the CA IDMS statistics block to a dialog's record buffers. An ACCEPT STATISTICS command does not reset fields in the CA IDMS statistics block. The fields are initialized at the beginning of a run unit. The only acceptable status code returned for an ACCEPT STATISTICS command is 0000.

Example

The statements in the following example:

Sample Statements

MOVE IN-PROD-NUMBER TO PROD-NUMBER.
FIND CALC PRODUCT.
MOVE IN-ORD-NUMBER TO ORD-NUMBER.
FIND CALC ORDOR.
STORE ITEM.
ACCEPT STATS INTO SAVE-STATS FROM IDMS-STATISTICS.