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.
To define custom reporting fields
Set parameters to be read at Adabas Review startup.
Modify the REVIEW-ADABAS-Vvrs-CLOG DDM to reflect the data types and lengths.
This document covers the following topics:
Field definition parameters are read from the RVUFLD data set.
Sample parameters are provided in member USRPARM in the Adabas Review source library.
Each field is defined by a NAME statement followed by field description statements.
Possible values for the NAME statement are USERFLD1 through USERFLD5.
NAMES must be coded in ascending order with no gaps; for example, USERFLD2 must be followed by USERFLD3, not USERFLD 4.
Parameter | Values | Description |
---|---|---|
NAME | USERFLD1 through USERFLD5 | Field name |
LEN | numeric | Length of the field in the Adabas Review internal command log record, LORECR. |
INTYPE | C (character) B (binary) T (time) |
Format of the data in CLOG or CLEX. |
OUTTYPE | C (character) N (numeric) H (hexadecimal) T (time) G (Gregorian date) |
Format of the data when printed or displayed. |
OFFSET | numeric in decimal, not hex | Offset into the Adabas Review internal command log record, LORECR. |
DISPLEN | numeric | Length of the data when printed or displayed. |
HEADER | alphanumeric, 8-byte maximum | Name of the field when printed or displayed. |
CALC | YES | NO | Whether the field can be used for SUM, AVG, PCT, RATE. |
Each user field definition must be reflected in the DDM.
To modify the DDM
Enter the Natural SYSDDM facility.
Edit the DDM
REVIEW-ADABAS-Vvrs -CLOG
Be sure to place "Y" in the REPLACE field.
Scan for user fields by entering on the command line
SC USER-FIELD
Modify the length and type of the fields
USER-FIELDn
Press PF11 to catalog the DDM.
The user fields you have defined are now ready to be used.
To access the new fields either online or in batch
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.
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 |