Version 4.3.2
 —  Using Batch Facilities  —

Using Adabas Review in Batch Natural

The functions described earlier to start and view Adabas Review reports are used mainly in an online environment. You may also perform these functions in a batch job to obtain statistics on a batch Adabas job as output from the job itself.

Note:
If you are trying to start a report in hub mode using batch Natural , you must issued the MENU HUB=hubid command prior to issuing the START command for the report.

This document covers the following topics:


Example

A batch Natural job (PAYROLL1) is run each night. When the job is completed, Adabas summary statistics are requested to determine the number of Adabas calls issued by the job, the files accessed, the type of Adabas commands issued, and a summary of ASSO, DATA, and WORK IOs for each command type within each file.

Start of instruction setTo implement the request for Adabas summary statistics

  1. Ensure that the Review load library is in the STEPLIB concatenation.

  2. Define the following report definition and related processing rules to Adabas Review:

    20:47:45                  A D A B A S  -  R E V I E W               2003-07-07
                                      Edit Report                       LOCL=00009
                                                                           
           
     Report Name: TRACE PAYROLL REPORT____________  DBID to Monitor:____9     
                                                                           
               
     +-----------------------------------------------------------------+     
     |  Field      Order   Sum   Min   Max   Avg   Pct   Rate   Round  |           
     |-----------------------------------------------------------------|    
     | FILE____     _10     _     _     _     _     _     _    ______  |      
     | CMD_____     _20     _     _     _     _     _     _    ______  |       
     | COMMANDS     ___     X     _     _     _     _     _    ______  |      
     | ASSOIO__     ___     X     _     _     _     _     _    ______  |      
     | DATAIO__     ___     X     _     _     _     _     _    ______  |      
     | WORKIO__     ___     X     _     _     _     _     _    ______  |      
     | ________     ___     _     _     _     _     _     _    ______  |      
     | ________     ___     _     _     _     _     _     _    ______  |      
     | ________     ___     _     _     _     _     _     _    ______  |      
     +---------------------------- Page 1------------------------------+      
                                                                                  
     Command: ______________________________________________________________________
     Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
           Help  Optns Exit        Save  Start  -     +          Rules Flds  Menu
    20:50:02                  A D A B A S  -  R E V I E W               2003-07-07
                                 Report Processing Rules                LOCL=00009
                                                                                  
                                  TRACE PAYROLL REPORT                     
            
     +-----------------------------------------------------------------------------+
     |  Field    Op        Value                                           And/Or  |
     |-----------------------------------------------------------------------------|
     | JOBNAME_  =  PAYROLL1________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     | ________  __ ________________________________________________________  ___  |
     +---------------------------------- Page 1------------------------------------+
                                                                                   
     Command: ______________________________________________________________________
     Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
           Help  Optns Exit        Save  Start  -     +                Flds  Menu
  3. Save the report definition.

  4. Change the PAYROLL1 job stream if necessary to produce the required results shown below:

    LOGON SYSREVDB                      <---logon to
    Review Natural library
    START TRACE.PAYROLL.REPORT dbid     <---start Review report
    LOGON PAYROLL
    *
    * PAYROLL1 NATURAL STREAM
    *
    LOGON SYSREVDB                      <---logon to Review Natural
    library
    VIEW TRACE.PAYROLL.REPORT dbid      <---to display report results
    DELREP TRACE.PAYROLL.REPORT dbid    <---to delete report results
    FIN

Note:
If you do not specify a DBID, Adabas Review uses the DBID corresponding to LFILE 241.

Top of page

Processing History Data in Batch Natural

You may also use batch Natural programs to display, purge, or compress history data from the Adabas Review repository. Adabas Review provides sample jobs to perform these tasks.

Start of instruction setTo use these jobs

  1. Point the LFILE to the DBID and FNR corresponding to the Adabas Review repository containing the history data.

  2. Add the report name and date range.

  3. Enter any embedded blanks in the report name as periods.

Start of instruction setTo display history data

  1. Use the HISTVIEW job.

    The following Natural statements are contained in the display history data job stream:

    LOGON SYSREVDB                      <--logon to
    Review Natural library.
    HISTORY A.HISTORY.REPORT start-date end-date  <--report name and
    dates.
    FIN
    /*

Start of instruction setTo delete history data

  1. Use the HISTDEL job.

    The following Natural statements are contained in the delete history data job stream:

    LOGON SYSREVDB                      <--logon to
    Review Natural library.
    DELHIST A.HISTORY.REPORT start-date end-date  <--report name and
    dates.
    FIN
    /*

Start of instruction setTo compress history reports

  1. Use the HISTCOMP job.

    The following Natural statements are contained in the compress history job stream:

    LOGON SYSREVDB                      <--logon to
    Review Natural library.
    COMPRESS A.HISTORY.REPORT start-date end-date et-factor <--report
    info.
    FIN
    /*

Top of page

Unloading and Restoring Report Definitions

Review report definitions can be unloaded to a sequential dataset for backup, archive or for the purpose of moving the definition to a different Review system. There are two batch Natural programs to accomplish this, ULDREP2 and LODREP2. ULDREP2 unloads a single report definition to a sequential dataset as defined by the Natural work file CWFWK01. LODREP2 restores the definition from the same sequential dataset.

The syntax for ULDREP2 is:

ULDREP report.name

where REPORT.NAME is the report name with periods between each word in the report name.

The syntax for LODREP2 is:

LODREP report.name

The job control statements to run ULDREP2 and LODREP2 are the same as other Review batch Natural jobs such as START, VIEW and DELHIST.

Top of page