Data Definition Language (DDL) Reference Manual

Definition Attributes
Data Definition Language (DDL) Reference Manual529431-004
6-72
USAGE
For the PACKED-DECIMAL data type and a PICTURE 9999 declaration, the number
+1234 is stored like this:
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
include the symbol S.
Example 6-59. USAGE COMPUTATIONAL Clause
DDL
!?DICT
!DEF EMP.
!02 F1 PIC 9999 PACKED-DECIMAL VALUE 1234.
!END.
!?COBOL
!OUTPUT *.
$ADE101 JYOTI 4> DDL
DDL Compiler T9100ABQ - (15NOV99) SYSTEM \BOMBAY
COPYRIGHT TANDEM COMPUTERS INCORPORATED 1978, 1979, 1981, 1982, 1986-1999
!?DICT
Audited dictionary created on subvol $ADE101.JYOTI.
Dictionary opened on subvol $ADE101.JYOTI for update access.
!DEF EMP.
!02 F1 PIC 9999 PACKED-DECIMAL VALUE 1234.
!END.
Definition EMP size is 3 bytes.
Definition EMP added to dictionary.
!?COBOL
* SCHEMA PRODUCED DATE - TIME : 8/01/2000 - 11:20:29
Output source for COBOL is opened on $ZTN1.#PTPJHYV
!OUTPUT *.
Loading Definition EMP
?SECTION EMP,TANDEM
* Definition EMP created on 08/01/2000 at 11:20
01 EMP.
02 F1 PIC 9999 COMP-3
VALUE 1234.
COBOL output produced for EMP.
00000001
01
1 byte
00100011
23
1 byte
01001111
4 F (sign)
1 byte
VST007.vsd