Sign in

docs DDS Physical

SIGNED (Signed) keyword for physical and logical files

SIGNED (Signed) keyword for physical and logical files

SIGNED (Signed) keyword for physical and logical files

If this key field-level keyword is in effect, when sequencing the values associated with this numeric key field, the operating system considers the signs of the values (negative versus positive values).

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

By default (with no sequencing keywords specified and without the ALTSEQ keyword), the key field has the SIGNED attribute. The records are sequenced in the following order:

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

If both SIGNED and DESCEND are specified, the records are sequenced in this order:

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

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

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

Example

The following example shows how to specify the SIGNED keyword for a physical file.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R RECORD
00020A            FLDA           7S 2
00030A            FLDB
00040A          K FLDA                      SIGNED
     A