Version 4.6.2
 —  Administration  —

Defining Adabas Review User Fields

The Adabas Review administrator can create up to five custom reporting fields. Portions of the command log and command log extension can be remapped using parameters to specify offsets and data types for these new fields.

This document covers the following topics that describe how to define custom reporting fields:


Step 1. Set Parameters to Be Read at Adabas Review Startup

Field definition parameters are read from the RVUFLD data set at startup. Sample parameters are provided in member RVUFLD in the Adabas Review source library.

Rules of Syntax

graphics/review_syntax_rules.png

Keywords

Parameter Values Description
NAME USERFLD1 through USERFLD5 Field name that can be used in a report definition. .
CALC YES | NO Whether the field can be used for SUM, AVG, PCT, RATE.
DISPLEN numeric Length of the data when printed or displayed.
EXTOFF ???? ????
FIELD Two parameter values:
  • 8-byte alphanumeric Adabas Review field name (depicted by ffffffff in the syntax) or RDBLKUSR.

  • Optional 2-byte numeric starting offset in the named field (depicted by oo in the syntax)

The name of an Adabas Review field, followed immediately by an optional plus sign (+) and field offset value. No spaces should be specified around the plus sign.

This is useful when you want to obtain the contents of a user field from part of the contents of an existing Adabas Review field.

This parameter is mutually exclusive with the OFFSET parameter.

The RDBLKUSR user field name is reserved for use with the REVUEX1 user exit.

HEADER alphanumeric, 10-byte maximum Title of the field when printed or displayed.
INTYPE C (character)
B (binary)
T (time)
Format of the data in the Adabas Review internal command log record, LORECR.
LEN numeric Length of the field in the Adabas Review internal command log record, LORECR.
OFFSET numeric in decimal, not hex Offset into the Adabas Review internal command log record, LORECR.

This parameter is mutually exclusive with the FIELD parameter.

OUTTYPE C (character)
N (numeric)
H (hexadecimal)
T (time)
G (Gregorian date)
Format of the data when printed or displayed.

The FIELD, EXTOFF, and OFFSET parameters are mutually exclusive in a user field definition; only one of them may be specified. For example, suppose you wanted to define user field USERFLD1 as the last eight bytes of the communication ID. The communication ID can be accessed at either offset 88 (X'58') of LORECR or as the last eight bytes of the Adabas Review USERID field (which is 28 bytes long). You could define USERFLD1 in either of the following ways:

Top of page

Step 2. Modify the REVIEW-ADABAS-Vvrs -CLOG DDM

The data types and lengths of each user field definition must be reflected in the DDM.

Start of instruction setTo modify the DDM:

  1. Enter the Natural SYSDDM facility.

  2. Edit the DDM

    REVIEW-ADABAS-Vvrs -CLOG

    Be sure to place "Y" in the REPLACE field.

  3. Scan for user fields by entering on the command line

    SC USER-FIELD
  4. Modify the length and type of the fields

    USER-FIELDn
  5. Press PF11 to catalog the DDM.

    The user fields you have defined are now ready to be used.

Start of instruction setTo access the new fields either online or in batch:

  1. Use the field names USERFLD1 through USERFLD5 as you would any other Adabas Review reporting field.

    Important:
    Before changing user-defined fields, carefully consider the impact on existing reports and data. For example, if you were to create history data for a particular report that uses USERFLD1 and then you change USERFLD1 to represent different data, incorrect data would be added to the history report the next time the report stored history data.

Top of page

Step 3. Modify the Adabas Review FDT

Modify the Adabas Review FDT.

Top of page

Example of Defining Adabas Review User Fields

Suppose you wanted to display the last eight characters of the 28-byte communication ID in a user field. You would first determine that communication ID is stored in LORECR field LOX1CMID at offset X'44' or a decimal offset of 68. So the offset of the last eight characters of the communication ID is at decimal offset 88.

The specification for the user field, USERFLD1, would look like this:

         NAME=USERFLD1                                                  
         LEN=8                                                          
         INTYPE=C                                                       
         OUTTYPE=C                                                      
         OFFSET=88                                                      
*----------------------------------------------------------------------*
*        OFFSET=X'58' = last 8 bytes of the communication ID in LORECR *
*----------------------------------------------------------------------*
         DISPLEN=8                                                      
         HEADER=LOX1CMID                                                
         CALC=NO

The specification for a report using the user field might look like this:

11:50:48                  A D A B A S  -  R E V I E W                2009-05-26
                                  Edit Report                        LOCL=00204
      Detail/Summary: S                                                        
      Report Name: RVUFLD45 - TEST OF LOX1CMID_____      DBID to Monitor: __204
                                                                              
      +-----------------------------------------------------------------+      
      !  Field      Order   Sum   Min   Max   Avg   Pct   Rate   Round  !      
      !-----------------------------------------------------------------!      
      ! SEQUENCE     _10     _     _     _     _     _     _    ______  !      
      ! DATE____     _20     _     _     _     _     _     _    ______  !      
      ! TIME____     _30     _     _     _     _     _     _    ______  !
      ! CMD_____     _40     _     _     _     _     _     _    ______  !      
      ! USERFLD1     _50     _     _     _     _     _     _    ______  !

The specification for the DDM might look like this:

11:43:22                  ***** Edit DDM (ADA) *****                 2009-05-26
DDM Name REVIEW-ADABAS-V451-CLOG           Def.Seq.        DBID   255 FNR   241
Command                                                                        
I T L DB Name                             F       Leng S D Remark              
- - - -- -------------------------------- - ---------- - - ------------------- 
S   3 EH USER-FIELD1                      A          8     (1:7)               

The report might look like this:

11:49:23                 RVUFLD45 - TEST OF LOX1CMID                 2009-05-26
                 11:49:16 2009-05-26 Thru 11:49:23 2009-05-26        LOCL=00204
                                                                     Page:    1
                                                                               
 Sequence      Date      Time   Cmd LOX1CMID                                   
----------- ---------- -------- --- --------                                   
                                                                               
       4756 2009-05-26 11:49:16 V4  TSU23242                                   
       4757 2009-05-26 11:49:16 V4  TSU23242                                   
       4758 2009-05-26 11:49:16 S1  TSU23242                              

Top of page