Activity Logging for an CA ADS Dialog

Activity Logging for an CA ADS Dialog
idmscu
The activity logging feature of CA ADS creates activity records that document all potential database activity for a dialog. Documentation is based on the database commands issued explicitly or implicitly by the dialog's processes. (Examples of implicit database commands are the implicit READY command, issued automatically for each subschema area when a run unit is opened for a process, and the BIND command, issued automatically for each subschema record used by the dialog.) If enabled, activity logging is performed when a dialog is compiled and has no impact on runtime performance.
The activity logging feature can be used to perform the following tasks:
  • Monitor database usage
    ── If runtime activity is high for a particular subschema area, set, record, or logical record, activity records can show which dialogs contain database commands that potentially access the entity.
  • Modify dictionary entity occurrences
    ── If a subschema area, set, record, or logical record needs to be modified, activity records can show which dialogs need to be recompiled as a result of the modification.
Enabling Activity Logging
The activity logging feature is enabled or disabled at system generation. The application developer can override the system generation default when defining a dialog. If enabled, the activity logging feature creates database activity records when a dialog is compiled. Database activity records can be accessed by using query programs such as OnLine Query, by using the Data Dictionary Reporter, or by writing an appropriate program.
Data Dictionary Organization
Database activity records are stored as junction records between a dialog PROG-051 record and the dictionary AREA, SET, RECORD, and LOGICAL RECORD entities as follows:
Dictionary entity
Junction record stored
SSA-024 (AREA)
AFACT-057
SSOR-034 (SET)
SETACT-061
SSR-032 (RECORD)
RCDACT-059
LR-190 (LOGICAL RECORD)
LRACT-193
Thus, if an area, set, record, or logical record must be modified, the application developer can follow a path from the dictionary entity occurrence, through the appropriate junction record, to the PROG-051 records of the dialogs that need to be recompiled because of the modification.
Activity Logging Record Formats
An activity logging record contains the following information about the database command being logged for a dialog:
  • The function number of the database command being logged
  • The number of times in the dialog that the database command is coded against the dictionary entity occurrence
  • The name of the dictionary entity occurrence
AFACT-057
The record description of the AFACT-057 junction record is as follows:
02 AF-FUNCT-057     PICTURE IS S9(4) USAGE IS COMP. 02 AF-COUNT-057     PICTURE IS 9(4)  USAGE IS COMP. 02 AF-AREA-OWN-057  PICTURE IS X(32) USAGE IS DISPLAY. 02 EXTRNL-NAME-057  PICTURE IS X(32) USAGE IS DISPLAY. 02 FILLER           PICTURE IS X(4)  USAGE IS DISPLAY.
SETACT-061
The format of the SETACT-061 junction record is as follows:
02 SA-FUNCT-061     PICTURE IS 9(4)  USAGE IS COMP. 02 SA-COUNT-061     PICTURE IS 9(4)  USAGE IS COMP. 02 SA-SET-OWN-061   PICTURE IS X(32) USAGE IS DISPLAY. 02 FILLER           PICTURE IS X(4)  USAGE IS DISPLAY.
RCDACT-059
The format of the RCDACT-059 junction record is as follows:
02 RA-FUNCT-059     PICTURE IS 9(4)  USAGE IS COMP. 02 RA-COUNT--059    PICTURE IS 9(4)  USAGE IS COMP. 02 RA-RCD-OWN-059   PICTURE IS X(32) USAGE IS DISPLAY. 02 FILLER           PICTURE IS X(4)  USAGE IS DISPLAY.
LRACT-193
The format of the LRACT-193 junction record is as follows:
02 FUNCT-193        PICTURE IS S9(4) USAGE IS COMP. 02 COUNT-193        PICTURE IS S9(4) USAGE IS COMP. 02 LR-NAM-193       PICTURE IS X(16) USAGE IS DISPLAY.
Record Fields
  • FUNCT
    Contains the numeric function number that is assigned to the database command or logical record command being logged.
    The function numbers for the AFACT-057 (AREA), SETACT-061 (SET), RCDACT-059 (RECORD), and LRACT-193 (LOGICAL RECORD) junction records and their associated database or logical record commands are listed in the following table.
    Note:
    No activity records are stored for the COMMIT and ROLLBACK database commands.
  • COUNT
    Contains the number of times the logged database command is coded in all of the processes of the dialog.
  • OWN
    Contains the name of the record, set, or area whose activity is being documented by the record, set, or area activity record.
  • EXTRNL-NAME
    Contains spaces.
  • NAM
    Contains the name of the logical record whose activity is being documented by the logical record activity record.
Usage
Considerations
The COUNT field for a READY command reflects only the effective READY commands issued implicitly or explicitly in the dialog's processes. An implicit or explicit READY command sets the usage mode of a database area during a dialog's premap or response process.
If the same area is named in more than one READY command in a process, the usage mode specified in the last READY command applies to the named area for the entire process. The COUNT field of a junction record for a READY command reflects the number of processes for which the specified usage mode applies to the specified area.
Activity Logging Function Numbers and Associated Commands
Junction record
Function number
Navigational or LRF database command
AFACT-057
3
FIND
 
6
KEEP and KEEP LONGTERM
 
15
ACCEPT
 
23
FIND KEEP
 
36
READY USAGE MODE UPDATE
 
37
READY USAGE MODE RETRIEVAL
 
38
READY USAGE MODE PROTECTED UPDATE
 
39
READY USAGE MODE PROTECTED RETRIEVAL
 
40
READY USAGE MODE EXCLUSIVE RETRIEVAL
 
41
READY USAGE MODE EXCLUSIVE UPDATE
 
43
OBTAIN
 
63
OBTAIN KEEP
SETACT-061
3
FIND
 
6
KEEP and KEEP LONGTERM
 
7
CONNECT
 
11
DISCONNECT
 
15
ACCEPT
 
16
IF SET EMPTY/MEMBER
 
17
RETURN
 
23
FIND KEEP
 
43
OBTAIN
 
63
OBTAIN KEEP
RCDACT-059
2
ERASE
 
3
FIND
 
5
GET
 
6
KEEP and KEEP LONGTERM
 
7
CONNECT
 
8
MODIFY
 
11
DISCONNECT
 
12
STORE
 
14
BIND
 
15
ACCEPT
 
23
FIND KEEP
 
43
OBTAIN
 
63
OBTAIN KEEP
LRACT-193
2
ERASE
 
8
MODIFY
 
12
STORE
 
43
OBTAIN