Defining Adabas Review User Fields

The Adabas Review administrator can create up to 35 custom reporting fields. Portions of the command log, like user data from the Adabas link routines provided via REVUEX1 can be remapped using parameters to specify offsets and data types for these new fields.

Warning:
Do not modify the Natural DDM or Adabas FDT to define Adabas Review user fields. If you do, errors will result. User fields can be used in a History report. If this is the case, the sequence of the user field definitions should not be changed any longer. Any new user field definition must be added at the end. The same applies if you use your own help texts for user fields. In addition, the OUTTYPE and DISPLEN definition of the specific user field used in the History report cannot be changed or the new definition might corrupt the existing history data.

User field definitions are read from the RVUFLD data set when Adabas Review starts up. It is not possible to change this definition during an active Adabas Review server. Sample parameters are provided in member RVUFLD in the Adabas Review source library. The following syntax rules must be used when setting the parameters that define user fields:

graphics/review_syntax_rules.png

  • Each field is defined by a NAME parameter followed by field description statements.

  • The NAME parameter specifies the name of the field, which can be up to eight alphanumeric characters long and must start with an alphabetic character. Special characters cannot be used in user field names and user field names may not be in the format "USRFLDnn" or "USERFLDn" or errors will result.

  • A maximum of 35 user fields may be defined.

  • There is no data translation done from INTYPE to OUTTYPE. The user is responsible to specify a meaningful combination there. For example, in case of INTYPE=B and OUTTYPE=N the value x´F1´ will be displayed as ´241´ instead of the probably expected ´1´.

  • If the NAME parameter with an offset, for example OFFSET or EXTOFF is wrongly specified and does point outside of the redefined field or outside the Review buffer, then error REV20190 is issued.

The following keywords are used in this syntax:

Parameter Values Description
NAME 8-byte alphanumeric user field name, starting with an alphabetic character, using no special characters, and not in the deprecated formats "USRFLDnn" or "USERFLDn" Field name of a user field that can be used in a report definition. All user field names must be one to eight alphanumeric characters long, must start with an alphabetic character, can include no special characters, and cannot be in the deprecated user field name formats "USRFLDnn" or "USERFLDn".
CALC YES | NO Option defining whether the field can be used for the numeric functions SUM, AVG, PCT, RATE, COST, or ROUND.

Note
This option is only useful for fields of input format binary (INTYPE=B) and output format numeric (OUTTYPE=N). For any other format types, the use of numeric functions is rejected.

DISPLEN numeric Length of the data when printed or displayed.
EXTOFF numeric in decimal, not hex The offset into the extended area used for derived fields.

This parameter is mutually exclusive with the FIELD, OFFSET and VALUE parameters.

FIELD 8-byte alphanumeric Adabas Review field name (depicted by ffffffff in the syntax) or "RDBLKUSR". The Adabas Review field name may be followed by a plus sign ("+") and an offset specifying the first byte of the user-defined field. The name of an Adabas Review field. Many fields have alternate names, so be sure to specify only the field names used for batch reports. To determine which field names are used for batch reports, see the individual field descriptions provided in the Field Reference. If an invalid alternate name is used, error REV20190 is issued.

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

This parameter is mutually exclusive with the OFFSET, EXTOFF and VALUE parameters.

HEADER alphanumeric, 10-byte maximum Title of the field when printed or displayed.
INTYPE C (character)
B (binary)
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. This might be shorter than the specified field, to use only portions of the field.
OFFSET numeric in decimal, not hex Offset into the Adabas Review internal command log record, LORECR.

This parameter is mutually exclusive with the FIELD, EXTOFF and VALUE parameters.

OUTTYPE C (character)
N (numeric)
H (hexadecimal)
Format of the data when printed or displayed.
VALUE (logical-condition;value),... This parameter specifies a logical condition and value, which determine the content of the user-defined field. Specify a condition and value separated by a semicolon ";". The condition and value have to be enclosed by parentheses "(…)". Up to 16 pairs of logical conditions and values can be specified per VALUE statement with each pair separated by a comma "," . At run time for each command log record the user-defined field is first reset and the pairs of logical conditions and values are evaluated in the sequence they are specified until a logical condition becomes true. If found true, the corresponding value is placed into the user-defined field and the evaluation of the user-defined field is terminated. If none of the logical conditions becomes true, the user-defined field remains reset.

This parameter is mutually exclusive with the FIELD, OFFSET and EXTOFF parameters.

logical-condition field-name comparator compare-value [{AND|OR} field-name comparator value …] The logical condition describes a Boolean expression which determines the value of the user-defined field, if the Boolean expression becomes true. Only linear AND or OR Boolean operators are allowed and nesting by parentheses is not allowed.
field-name   This parameter specifies the Adabas Review field name used in the logical expression. field-name can also be a user-defined field, as long it has been defined prior to the actual user-defined field.
comparator {=|≠|<|>|EQ|NE|LT|GT} This parameter defines the compare operation between the field name and the value.
compare-value [(]constant[-constant],…[)],… This parameter defines the compare value to be compared with the field name. Decimal numbers and alphanumeric values can be specified. Alphanumeric values can be enclosed in quotes like ‘char’ or can be specified as hexadecimal value X’hexadecimal characters’. It is possible to specify a list or a range of values like in the report rules specification.
value Constant numeric or alphanumeric value This parameter defines the value to be assigned to the user-defined evaluation field, if the associated logical condition is evaluated as true. Decimal numbers and alphanumeric values can be specified. Alphanumeric values can be enclosed in quotes like ‘char’ or can be specified as hexadecimal value X’hexadecimal characters’. It is possible to specify a list or a range of values like in the report rules specification.

The FIELD, EXTOFF, OFFSET and VALUE parameters are mutually exclusive in a user field definition; only one of them may be specified.

Examples

Here are some examples of user field definitions:

NAME=MYFLD1    
     CALC=NO     
     LEN=2       
     INTYPE=C    
     OUTTYPE=C   
     OFFSET=182  
     DISPLEN=2   
     HEADER=MY1  

NAME=JOBCODE     
     CALC=NO     
     LEN=3        
     INTYPE=C     
     OUTTYPE=C    
     FIELD=JOBNAME       
     DISPLEN=3   
     HEADER=JOBCODE

NAME=CICS
     CALC=YES
     LEN=4
     INTYPE=B
     OUTTYPE=N
     HEADER=CICS
     VALUE=(USERTYPE=CICS;1)

Help Text for User Fields

If you request the online help for a user field, a default generic text is displayed. You can provide your own text by doing the following:
  1. Copy the template Natural text member T - LFUFNN in library SYSREVDB and rename it to T - LFUFnn, where nn is the user field number from the sequence in the RVUFLD data set. The name is also provided in the default generic text.
  2. Edit the new text member.

The following rules apply to the help text:

  • The line size is 72 characters.

  • The first column in a line indicates the line type:

    H - header line (first line only, automatically centered)

    T - text line (you can have as many as you need)

  • The second column is blank.

  • Column 3 can be used for special formatting characters.

  • The text starts in column 4.

You can use special formatting characters to customize the formatting of your text. The characters you can use depend on your code page. The correct and valid characters are shown in the template text member. When the help text is displayed, the special formatting characters are replaced by blanks.

Examples

The following is an example of a help text for the third user field named "CICS". The characters "<" and "@" are used to start and end the formatted text. Because the characters are code page specific, the text can look different in different environments.

The Natural text member T-LFUFNN is saved as T-LFUF03 in library SYSREVDB.

H  CICS
T  The<CICS@user field provides the number of<Adabas@calls issued
T  from<CICS@sessions.