Sign in

docs DDS Physical

ABSVAL (Absolute Value) keyword for physical and logical files

ABSVAL (Absolute Value) keyword for physical and logical files

ABSVAL (Absolute Value) keyword for physical and logical files

You can use this key-field level keyword to direct the operating system to ignore the sign of the field when the system sequences the values associated with this numeric field.

This keyword has no parameters.

The following example shows six records with a zoned decimal key field:

RecordNumeric key field (zoned decimal)Hexadecimal representation
198F9F8
200F0F0
398-F9D8
497F9F7
520F2F0
699F9F9

If you do not specify any sequencing keywords or the ALTSEQ keyword, the default sequencing for the key field is the SIGNED attribute. In this case, the records are sequenced in the following order:

RecordNumeric key field (zoned decimal)Hexadecimal representation
398-F9D8
200F0F0
520F2F0
497F9F7
198F9F8
699F9F9

If you specify the ABSVAL keyword, the absolute value of the negative field is used, and the resulting sequence is:

RecordNumeric key field (zoned decimal)Hexadecimal representation
200F0D0
520F2F0
497F9F7
198F9F8
398-F9D8
699F9F9

The ABSVAL keyword is not valid for a character, date, time, timestamp, and hexadecimal data type field. You cannot use this keyword with the DIGIT, SIGNED, UNSIGNED, or ZONE keywords.

ABSVAL (a key field-level keyword) causes ALTSEQ (a file-level keyword) to be ignored. If you specify ABSVAL for a key field, NOALTSEQ is in effect for that key field, even if ALTSEQ was specified at the file level. This occurs, even if the NOALTSEQ keyword is specified.

Example

The following example shows how to specify the ABSVAL keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A            ORDAMT         5  0
00020A          K ORDAMT                    ABSVAL
     A