DBLOG Snapshot Function

The snapshot function provides detailed information on one particular Adabas command, SQL statement, or VSAM call.

This section covers the following topics:


Snapshot Function for Adabas Commands

This snapshot function interrupts program execution after executing the first Adabas command that matches the selection criteria specified in the DBLOG Menu. The Snapshot Report (see the following example screen) generated for the specified Adabas command is displayed immediately after program interruption.

The snapshot function automatically logs all Adabas buffers. Therefore, you do not have to mark any of the optional buffers in the DBLOG Menu before you start the snapshot function. The default Snapshot Report displays the control block (CB), which is either the classic control block (ACB) or the extended Adabas control block (ACBX).

This section covers the following topics:

Invoking Snapshot Report for Adabas Commands

Start of instruction set To invoke the Snapshot Report screen for Adabas commands

  1. In the DBLOG Menu, specify an Adabas command and additional criteria, if desired, and enter function code S.

    The message DBLOG snapshot facility started now is displayed.

  2. Execute a Natural program which contains the Adabas command specified in the DBLOG Menu.

    The program stops executing and a Snapshot Report screen similar to the example below appears:

    16:36:39             ***** NATURAL TEST UTILITIES *****              2006-12-12
                                - Snapshot Report -
    
    Command Code : L3           Command ID   :  ??? 00200101 File Number  : 013C
    Response Code:      0       ISN          :          1300
    ISN Low Limit: 00000000     ISN Quantity :             0
    FB Length    : 0009         RB Length    : 0014          SB Length    : 0008
    VB Length    : 0014         IB Length    : 0000          Com. Option 1:
    Com. Option 2: V            Additions 1  : AE]?          Additions 2  :  ? ?
    Additions 3  :              Additions 4  :
    Global FID   : 0000000000000000 Command Time : 00000019 Pgm: SAGTEST  Lin: 0020
    Control Block
    0000 * 30D5D3F3 00200101 013C0000 00000514 * ?NL3 ?????    ?? * 0000
    0010 * 00000000 00000000 00090014 00080014 *          ? ? ? ? * 0010
    0020 * 000000E5 C1C5BBCA 40404040 00120014 *    VAE]?     ? ? * 0020
    0030 * 00000000 00000000 00000000 00000000 *                  * 0030
    0040 * 00000000 00000000 00000019 00000000 *            ?     * 0040
    0050 * 00000000 00000000 00000000 00000000 *                  * 0050
    0060 * 00000000 00000000 00000000 00000000 *                  * 0060
    0070 * 00000000 00000000 00000000 00000000 *                  * 0070
    
    
    Command ===> CB________________________________________________________________
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
          Help        Exit  CB    FB    RB     -     +    SB    VB    IB    Canc

Displaying Buffers on Snapshot Report

The Snapshot Report screen shows the control block (CB) by default. If you want to display different Adabas buffers or scroll through a report, choose the appropriate PF key or, in the Command line, enter its equivalent direct command described in this section.

The availability of a PF key depends on the buffer currently displayed. If a buffer extends beyond the screen or contains multiple format/record buffers, PF keys required to scroll through the buffer are provided on the screen.

PF Key Direct Command Buffer
PF4 CB Displays the control block. This is the default.
PF5 FB Displays the format buffer.
PF6 RB

or

--
Displays the record buffer (RB) or scrolls (--) to the beginning of a long buffer.
PF7 - Scrolls up one page in a long buffer.
PF8 + Scrolls down one page in a long buffer
PF9 SB

or

++
Displays the search buffer (SB) or scrolls (++) to the end of a long buffer.
PF10 VB

or

<
Displays the value buffer (VB). For multiple format/record buffers, shows the previous (<) record/format buffer.
PF11 IB

or

>
Displays the ISN buffer (IB). For multiple format/record buffers, shows the next (>) record/format buffer.

For information on the fields displayed in a control block or buffer, see Displaying Adabas Buffers.

Snapshot Function for SQL Statements

The snapshot function generates the Snapshot Report (see the following example screen) of the first SQL statement that matches the selection criteria specified in the DBLOG Menu. A snapshot does not interrupt the program flow.

Unlike the statements displayed with the DBLOG trace function, the snapshot shows the statement in its entirety (limited to 13 lines).

The snapshot data is kept in the Natural DBLOG buffer to be displayed only if the user enters the appropriate DBLOG command as described below.

This section covers the following topics:

Invoking Snapshot Report for SQL Statements

Start of instruction set To invoke the Snapshot Report screen for SQL statements

  1. In the DBLOG Menu, specify an SQL statement and additional criteria, if desired, and enter function code S.

    The message DBLOG snapshot facility started now is displayed.

  2. Execute a Natural program which contains the SQL statement specified in the DBLOG Menu. (Log data is written to the Natural DBLOG buffer.)

  3. Display the snapshot data by entering the following command:

    TEST DBLOG Q

    Or:
    In the DBLOG Menu, enter function code E.

    A Snapshot Report screen for SQL statements similar to the example below appears:

    10:59:28              ***** NATURAL Test Utilities *****             2006-12-12
    User SAG                      - Snapshot Report -              Library SAG
    
    CU SN M Typ R SQLC/W     Library  Program  Store Clock Value   Line LV CID(Hex)
    01 01 D DB2              SAG      SAGTEST  2002/04/03 14:23:06 0150 01 01500101
    
    SQL Statement
    SELECT EMPNO,FIRSTNME,MIDINIT,LASTNAME,EDLEVEL,SALARY FROM DSN8510.EMP WHERE EM
    PNO > '000300' FOR UPDATE OF EDLEVEL
    
    
    
    Command ===>
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
          Help  Print Exit                                                  Canc

Snapshot Report Information for SQL Statements

The following information is provided on the Snapshot Report screen for SQL statements:

Column Explanation
CU Cursor number.
SN Internal statement number.
M Mode: D for dynamic or S for static.
Typ Database type: Db2.
R Only applicable if the Natural File Server for Db2 is in use.

Indicates by an asterisk in front of the corresponding statement that a reselection has been performed; if not, the column is left blank.

See also Concept of the File Server in the Natural for Db2 documentation.

SQLC/W Either the SQL return code in the SQLCODE field of the SQLCA, or the warning in the SQLWARN0 field of the SQLCA if SQLCODE is 0.
Library The library where the Natural program with the logged statement was cataloged.
Program The name of the Natural program which contains the logged statement.
Store Clock Value The time stamp of the Natural program which contains the logged statement.
Line The source code line number of the logged statement.
LV The call level of the Natural program which contains the logged statement.
CID (Hex) The command ID of the logged statement in hexadecimal format.

Snapshot Function for VSAM Calls

This snapshot function generates the Snapshot Report (see the following example screen) of the first VSAM call that matches the selection criteria specified in the DBLOG Menu. A snapshot does not interrupt the program flow. The snapshot data is kept in the Natural DBLOG buffer to be displayed only if the user enters the appropriate DBLOG command as described below.

This section covers the following topics:

Invoking Snapshot Report for VSAM Calls

Start of instruction set To invoke the Snapshot Report screen for VSAM calls

  1. In the DBLOG Menu, specify a VSAM call and additional criteria, if desired, and enter function code S.

    The message DBLOG snapshot facility started now is displayed.

  2. Execute a Natural program which contains the VSAM call specified in the DBLOG Menu. (Log data is written to the Natural DBLOG buffer.)

  3. Display the snapshot data by entering the following command:

    TEST DBLOG V

    or

    TEST DBLOG V SHOW

    Or:
    In the DBLOG Menu, enter function code E.

    A Snapshot Report screen for VSAM calls similar to the example below appears:

    11:19:53            ***** Natural Test Utility *****                2019-10-14
    User SAG                  - Snapshot Report -                 Library SAG    
                                                                                   
            VSAM Call..... : GETNXT        CID(Hex).... : 00500101                 
            Flag 02  ..... : 32            CMD Code.... : L3                       
            Flag 03  ..... : 00            FILENAME.... : EMPLVS                   
            Flag 04  ..... : 00            PATHNAME.... :                          
            Flag 06  ..... : 90            RETCODE..... : 0000      (Hex)          
            VSAM Key ..... : 11100102      ProbCode.... : 00000000  (Hex)          
            NAT Pgm  ..... : VSAM01        Key Len..... :     8                    
            PgmLine  ..... : 0050          Nat Resp.... :                          
            FileType ..... : KSDS          DBID/FNR.... :   254 /     1            
                                                                                   
     Record:  CHAR : 11100102EDGAR               PETER               SCHINDLER     
              HEX  : FFFFFFFFCCCCD444444444444444DCECD444444444444444ECCCDCDCD44444
                     11100102547190000000000000007535900000000000000023895435900000
                                                                                   
     CBA   :  CHAR :  VL3 &????               ? ? ? ?   AAANVSL3L                  
              HEX  : 0EDF0500F00000000000000000000000000CCCDEEDFD000000000000000000
                     05330011E10000000000000007080708000111552333000000000000000000
                                                                                   
     SB    :  CHAR : AA,8,A.                                                       
              HEX  : CC6F6C40000000000000000000000000000000000000000000000000000000
                     11B8B1B0000000000000000000000000000000000000000000000000000000
                                                                                   
     FB    :  CHAR : AA,8,A.                                                       
              HEX  : CC6F6C40000000000000000000000000000000000000000000000000000000
                     11B8B1B0000000000000000000000000000000000000000000000000000000
                                                                                   
     RB    :  CHAR :                                                               
              HEX  : 44444444000000000000000000000000000000000000000000000000000000
                     00000000000000000000000000000000000000000000000000000000000000
                                                                                   
     ISN   :  CHAR :                                                               
              HEX  : 00000000000000000000000000000000000000000000000000000000000000
                     00000000000000000000000000000000000000000000000000000000000000
                                                                                   
     VB    :  CHAR :                                                               
              HEX  : 00000000000000000000000000000000000000000000000000000000000000
                     00000000000000000000000000000000000000000000000000000000000000

Snapshot Report Information for VSAM Calls

The following information is provided on the Snapshot Report screen for VSAM calls:

Field Explanation
VSAM Call VSAM call issued.
File 02 Flag 02 from the DCR copybook.
Flag 03 Flag 03 from the DCR copybook.
Flag 04 Flag 04 from the DCR copybook.
Flag 06 Flag 06 from the DCR copybook.
VSAM Key First 8 bytes of the VSAM key.
NAT Pgm Natural program name.
PgmLine Source code line number of the Natural program.
FileType File type KSDS, ESDS or RRDS.
CID(HEX) Command ID, equivalent to that of ADABAS.
CMD CODE Equivalent ADABAS command.
FILENAME VSAM file accessed.
PATHNAME Path name for the VSAM file accessed.
RETCODE Return code from the VSAM call.
ProbCode Problem code from the VSAM call.
Key Len VSAM key length.
Nat Resp Natural return code, if any.
Record First 62 bytes of the VSAM record.
CBA First 62 bytes of the CBA record.
SB First 62 bytes of the search buffer.
FB First 62 bytes of the format buffer.
RB First 62 bytes of the record buffer.
ISN First 62 bytes of the ISN buffer.
VB First 62 bytes of the value buffer.