Version 4.2.6 for Mainframes (Update)
 —  Utilities  —

Executing DBLOG

The DBLOG utility logs each Adabas command, or DL/I and SYNC/ROLB call, or SQL statement after it has been processed by the database system. Logging starts when you activate DBLOG and execute or run a Natural program.

This section covers the following topics:


Basic Principles of Database Logging

The following graphic illustrates the process flow when database calls are being logged from a Natural program with the DBLOG utility:

Legend

The logging of database calls (Adabas commands, or DL/I and SYNC/ROLB calls, or SQL statements) is activated by using the corresponding DBLOG Menu function or the Natural system command TEST DBLOG.
In the DBLOG Menu, you can specify individual selection criteria (for example, restrict the logging to a particular database ID or file number).

A Natural program issues a statement that initiates a database call, for example, FIND or READ.

The database log agent forwards the database call to the database handler.

The database handler adapts the database call to the particular database (Adabas, DL/I or SQL), retrieves the data requested by the database call and returns this data to the database log agent.

The database log agent records in the Natural DBLOG buffer the data returned by the database handler and forwards this data to the Natural program.

The report function of the DBLOG utility reads the data recorded in the Natural DBLOG buffer and selects records according to the selection criteria specified in the DBLOG Menu in .

From the data records selected, the report function of the DBLOG utility generates a report that can be displayed, written to a work file or used for batch processing.

Top of page

Data Processing and Storage

The data logged by the DBLOG utility is recorded in the Natural DBLOG buffer. The initial and maximum sizes of the buffer are determined by the DSIZE profile parameter described in the Parameter Reference documentation.

If there is not enough space to hold the data in the DBLOG buffer, Natural increases the DBLOG buffer size appropriately (possibly several times) until the maximum size specified with of the DSIZE profile parameter is reached. After the maximum is reached, only the most recent log data is held in the Natural DBLOG buffer.

If the DBLOG buffer size cannot be further increased due to lack of storage, Natural issues a NAT7545 message that indicates insufficient space for the DBLOG buffer. All data logged prior to this lack-of-storage situation will be kept in the Natural DBLOG buffer and can be displayed by using the TEST DBLOG command.

DBLOG can be used online or in batch mode. DL/I and SYNC/ROLB calls can be logged under CICS, under IMS TM or in batch mode. For further information on batch-mode processing, refer to Natural in Batch Mode described in the Operations documentation.

The logs recorded are displayed on the DBLOG Trace screen.

The DBLOG utility provides default settings for data recording. When using the DBLOG Menu, you can specify selection criteria for the commands, calls or statements to be logged and the information displayed. The DBLOG Menu also provides functions for activating or deactivating logging. You can also use the Natural system command TEST DBLOG to control DBLOG execution.

The fields of the DBLOG Trace screen, the DBLOG Menu and the Natural system command TEST DBLOG are explained in the relevant sections of the DBLOG documentation.

Top of page

Activating and Deactivating DBLOG

The commands used to activate or deactivate DBLOG with the default DBLOG utility settings are described in the following section. See also TEST DBLOG Command for additional information.

Start of instruction setTo activate or deactivate DBLOG for Adabas

Start of instruction setTo activate or deactivate DBLOG for DL/I

Start of instruction setTo activate or deactivate DBLOG for SQL

Top of page

Using Selective DBLOG

The following are example instructions for logging Adabas commands, DL/I calls or SQL statements with selection criteria specified in the DBLOG Menu.

Start of instruction set To perform DBLOG with selection criteria

  1. Invoke the DBLOG Menu by entering one of the following Natural system commands:

    The DBLOG Menu appears.

  2. In the DBLOG Menu, specify logging restrictions and activate logging: complete the input fields and enter function code B.

    The message DBLOG started now is displayed.

  3. Execute a Natural program which contains Adabas commands, DL/I calls or SQL statements.

  4. Invoke the DBLOG Trace screen and deactivate logging by entering one of the following Natural system commands:

    The DBLOG Trace screen appears.

  5. Clear the Natural DBLOG buffer and deactivate logging by entering one of the following Natural system commands:

    DBLOG terminates and the NEXT prompt appears.

See also the section TEST DBLOG Command for additional information.

Top of page