@ACCEPT STATS -- moves system runtime statistics
The @ACCEPT STATS statement moves system runtime statistics located in the program's IDMS statistics block to program variable storage. You can issue this statement any number of times during the execution of a run unit. For example, you might request database statistics after storing a variable-length record to determine whether the entire record was stored in one place or if fragments were placed in an overflow area.
idmscu19
The @ACCEPT STATS statement moves system runtime statistics located in the program's IDMS statistics block to program variable storage. You can issue this statement any number of times during the execution of a run unit. For example, you might request database statistics after storing a variable-length record to determine whether the entire record was stored in one place or if fragments were placed in an overflow area.
The @ACCEPT STATS statement does not reset any of the statistics fields to zero. The IDMS statistics block fields are reset when you issue an @FINISH statement.
This article describes the following information:
2
2
Syntax
►►─── @ACCEPT STATS=db-statistics────────────────────────────────────────────► ►───┬────────────────────────────────┬───────────────────────────────────────►◄ └─ STATX=extended-db-statistics─┘
Parameters
STATS=
Moves system runtime statistics to a location in program variable storage identified by
db-statistics
.db-statistics
Identifies an aligned, 100-byte field. The dictionary contains a record, DBSTATS, for the system runtime statistics. You can copy this record into program variable storage by coding the following statement:
@COPY IDMS,DBSTATS DBSTATS DS OD DATE2DAY DS CL8 TODAY'S DATE TIME2DAY DS CL8 CURRENT TIME OF DAY PAGESRED DS F PHYSICAL PAGES READ PAGESWRT DS F PHYSICAL PAGES WRITTEN PAGESQST DS F LOGICAL PAGES READ CALCTARG DS F NO. CALC STORES ON TARGET PAGE CALCOVFL DS F NO. CALC OVERFLOWS VIATARGT DS F NO. VIA STORES ON OWNER PAGE VIAOVRFL DS F NO. VIA OVERFLOWS LINERQST DS F RECORDS (LINES) REQUESTED CURRECDS DS F RECORDS CURRENT IDMSCALL DS F NO. CALLS TO IDMSDBMS FRAGMTST DS F NO. VAR-LENGTH FRAGMENTS STORED RELORECS DS F NO. RECORDS RELOCATED LOCKREQS DS F TOTAL NO. RECORD LOCKS HELD SELECLOK DS F TOTAL NO. SELECT LOCKS HELD UPDATLOC DS F TOTAL NO. EXCLUSIVE LOCKS HELD RUNUNIT# DS F RUN-UNIT ID NUMBER TASK#ID DS F TASK ID NUMBER LOCAL#ID DS CL8 LOCAL ID NUMBER DS CL8 RESERVED
The LOCAL#ID field consists of the 4-byte identifier of the interface in which the run unit originated (for example, BATC, DBDC, CICS) and a unique identifier (a fullword binary value) assigned to the run unit by that interface. For batch and CMS run units, this identifier specifies the internal machine time. For CICS run units, this identifier specifies the CICS transaction number assigned to the run unit. To display the originating interface identifier and the run-unit identifier for a program, you can move the LOCAL#ID field to a work field:
WRKLCID DS 0D WRKLCORG DC CL4' ' WRKLCNUM DC F'0'
The DBSTATS record can be modified by your DBA to define two subordinate fields for the LOCAL#ID field.
STATX=
Moves extended system runtime statistics to a location in program variable storage identified by extended-db-statistics.
extended-db-statistics
Identifies an aligned, 100-byte field. The dictionary contains a record, DBSTATX, for the system runtime extended statistics. You can copy this record into program variable storage by coding the following statement:
@COPY IDMS,DBSTATS DS OD DBSTATX DS 0CL100 SR8SPLIT DS FL4 Number of SR8 splits SR8SPAWN DS FL4 Number of SR8 spawns SR8STORE DS FL4 Number of SR8 STOREs SR8ERASE DS FL4 Number of SR8 ERASEs SR7STORE DS FL4 Number of SR7 STOREs SR7ERASE DS FL4 Number of SR7 ERASEs BSRCHTOT DS FL4 Number of binary searches LSRCHTOT DS FL4 Number of levels searched ORPHADPT DS FL4 Number of orphans adopted LSRCHBST DS HL2 Best number of levels searched LSRCHWST DS HL2 Worst number of levels searched DS CL60
Most of these counters are self-explanatory. The BSRCHTOT field indicates the total number of binary searches performed during the course of the run unit. LSRCHTOT indicates the total number of index levels searched.
The LSRCHBST and LSRCHWST fields describe the best and worst cases, respectively, for all random searches (such as generic searches) of all indexes. In other words, these statistics indicate the smallest and largest number of levels searched for a single request.
Status Codes
After completion of the @ACCEPT STATS function, the ERRSTAT field in the IDMS communications block indicates the outcome of the operation. The following is a list of the acceptable status codes for this function and their corresponding meaning:
- 0000The request has been serviced successfully
- 1518The database statistics location has not been bound properly.
Example
The following statements establish currency for the sets in which a new EMPLOYEE record will participate as a member, store the EMPLOYEE record, and move statistics regarding the stored EMPLOYEE record to the DBSTATS location in main storage:
MVC DEPTID,INDEPTID @FIND CALC,REC='DEPARTMENT' MVC OFFCODE,IOFFCODE @FIND CALC,REC='OFFICE' @STORE REC='EMPLOYEE' @ACCEPT STATS=DBSTATS