Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 75
USAGE Clause
02 F1 PIC 9999 COMP-3
VALUE 1234.
COBOL output produced for EMP.
For the PACKED-DECIMAL data type and a PICTURE 9999 declaration, the
1234 would be stored as follows:
0 1 2 3 4 F (sign)
------------------ -------------------- -----------------
| 0000 | 00001 | | 0010 | 0011 | | 0100 | 1111 |
------------------ -------------------- -----------------
One BYTE One BYTE One BYTE
PACKED-DECIMAL
Specifies that the field or group is a numeric item that is stored in decimal form, but
one digit takes one-half byte. The sign is stored separately as the rightmost half
byte, regardless of whether S is specified in the PICTURE declaration.
DDL supports this data type to generate COBOL output only. Languages other
than COBOL do not support PACKED-DECIMAL or its equivalent data types. Any
attempt to generate output for the PACKED-DECIMAL data type in languages
other than COBOL cause DDL to issue error messages.
USAGE Clause Guidelines
The following points are guidelines for using the USAGE clause:
•
All fields declared as TYPE BINARY are COMPUTATIONAL items by default.
•
A field can be declared as COMPUTATIONAL if the associated PICTURE
declaration is of the form:
PIC [ S ] 9 ... [ (length) ] [ V 9 ... [ (length) ] ]
•
The symbol 9 can occur a maximum of 18 times in a picture for an item declared
as COMPUTATIONAL. If the symbol 9 occurs more than 10 times, the picture must
contain the symbol S.
•
When a group is declared as COMPUTATIONAL, each member of the group is
also COMPUTATIONAL. All elements of the group must either be declared TYPE
BINARY or have a picture compatible with TYPE BINARY. Reference definitions
(TYPE * or TYPE
def-name
) are accepted if they refer to an element declared as
COMPUTATIONAL or TYPE BINARY.
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...