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.
Field definition parameters are read from the RVUFLD dataset.
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 command log (CLOG) or the command log extension (CLEX). |
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 command log (CLOG). Mutually exclusive with CLEXOFF. Set one or the other, not both. |
CLEXOFF |
numeric in decimal, not hex | Offset into the command log extension (CLEX). Mutually exclusive with OFFSET. Set one or the other, not both. |
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.
For example, if you want to display the first eight characters of the value buffer in Hex in a summary report, we must know that all Review fields like xxSEGnn are stored in CLEX+736.
For the example, the specifications for the RVUFLD data set are:
NAME=USERFLD1 LEN=8 INTYPE=B OUTTYPE=H CLEXOFF=736 DISPLEN=16 HEADER=VB_HEX CALC=NO
The specifications for the example Report are:
Field | Order |
---|---|
SEQUENCE | _10 |
CMD_____ | _20 |
VBSEG01_ | _30 |
USERFLD1 | _40 |
It is important that the VBSEG01 field gets a lower order number than USERFLD1. In this case the characters of CLEX+736 are filled in first before the values are filled in. If you change the order, the field USERFLD1 is empty.
The specification for the DDM is:
I T L DB Name F Leng S D Remark - - - -- -------------------------------- - ---------- - - ------- 3 EH USER-FIELD1 B 8 (1:7)
The report appears as follows:
Sequence VB_HEX ----------- ---------------- 688 C1C4C44040404040 689 E2E8E2D9C5E5C4C2 690 E2E8E2D9C5E5C4C2 691 5C5C5C5C5C5C5C5C