Fixed point data types represent scaled quantities in a binary format. They can be SIGNED or UNSIGNED. o You can declare the total number of DIGITS and the number of those digits that are FRACTIONS. The number of digits must be greater than 0 and less than 32. The number of fractions must not be greater than the number of digits. The default number of fractions is 0. o You can specify a SCALE as an implied exponent. The signed integer must be in the range -128 to 127. The SCALE specification indicates the number of places to shift the decimal point when the field is evaluated. A negative specification indicates a shift of the specified number of places to the left, and a positive specification indicates a shift of the specified number of places to the right. When using SCALE, note the following rules: - The SCALE specification and the FRACTIONS specification have a similar function. They both indicate how many digits in a field are to the right of the decimal point. There are, however, two important differences: o The number of FRACTIONS you can specify is limited to the number of DIGITS you declare for the data type. With SCALE, there is no such limitation. o With SCALE, you can shift the decimal point to the right and to the left, but with FRACTIONS, you can shift the decimal point only to the left. - Use a positive integer in the SCALE specification to move the decimal point to the right. - Use a negative integer in the SCALE specification to move the decimal point to the left. o You can also specify the radix, or BASE, with an unsigned integer. The BASE indicates the number system to be used when the field is evaluated. The default BASE is 10.
1 – BYTE
Specifies that the field is an 8-bit byte. The BYTE can be SIGNED or UNSIGNED. If there is no sign specification, UNSIGNED is the default.
2 – WORD
Specifies that the field is a 16-bit word. The field can be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default.
3 – LONGWORD
Specifies that the field is a 32-bit longword. The LONGWORD can be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default.
4 – QUADWORD
Specifies that the field is a 64-bit quadword field. The field can be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default.
5 – OCTAWORD
Specifies that the field is a 128-bit octaword field. The field can be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default. 1 Decimal_string o You must declare the total number of DIGITS in the field. You can also declare which of those digits are FRACTIONS. The number of digits must be greater than 0 and less than 32. The number of fractions must not be greater than the number of digits. The default number of fractions is 0. o You can specify a SCALE as an implied exponent. The signed integer must be in the range -128 to 127. The SCALE specification indicates the number of places to shift the decimal point when the field is evaluated. A negative specification indicates a shift of the specified number of places to the left, and positive indicates a shift of the specified number of places to the right. When using SCALE, note the following rules: - The SCALE specification and the FRACTIONS specification have a similar function. They both indicate how many digits in a field are to the right of the decimal point. There are, however, two important differences: o The number of FRACTIONS you can specify is limited to the number of DIGITS you declare for the data type. With SCALE, there is no such limitation. o With SCALE, you can shift the decimal point to the right and to the left, but with FRACTIONS, you can shift the decimal point only to the left. - Use a positive integer in the SCALE specification to move the decimal point to the right. - Use a negative integer in the SCALE specification to move the decimal point to the left. o You can also specify the radix, or BASE, with an unsigned integer. The BASE indicates the number system to be used when the field is evaluated. The default BASE is 10.
6 – PACKED DECIMAL
Specifies that the field is a packed decimal numeric field. CDDL accepts PACKED NUMERIC as a synonym for PACKED DECIMAL.
7 – UNSIGNED NUMERIC
Specifies that the field is an unsigned decimal string. You must use the UNSIGNED keyword.
8 – ZONED NUMERIC
Specifies that the field is a VAX ZONED NUMERIC data type. CDDL accepts SIGNED NUMERIC as a synonym for ZONED NUMERIC.
9 – LEFT SEPARATE NUMERIC
Specifies that the field is a left separate signed numeric decimal string. CDDL accepts [SIGNED] NUMERIC LEFT SEPARATE as a synonym for LEFT SEPARATE NUMERIC.
10 – LEFT OVERPUNCHED NUMERIC
Specifies that the field is a left overpunched signed numeric decimal string. CDDL accepts [SIGNED] NUMERIC LEFT OVERPUNCHED as a synonym for LEFT OVERPUNCHED NUMERIC.
11 – RIGHT SEPARATE NUMERIC
Specifies that the field is a right separate signed numeric decimal string. CDDL accepts [SIGNED] NUMERIC RIGHT SEPARATE as a synonym for RIGHT SEPARATE NUMERIC.
12 – RIGHT OVERPUNCHED NUMERIC
Specifies that the field is a right overpunched signed numeric decimal string. CDDL accepts [SIGNED] NUMERIC RIGHT OVERPUNCHED as a synonym for RIGHT OVERPUNCHED NUMERIC.