Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 74
USAGE Clause
USAGE Clause
The USAGE clause declares a numeric storage allocation for a field or group or, for
COBOL, specifies using a field as an index.
COMP[UTATIONAL]
specifies that the field or group is a numeric item that is to be stored as a
computational value.
INDEX
specifies that a field is to be used as an index for COBOL only.
COMP[UTATIONAL]-3
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.
For example:
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.
[ USAGE [ IS ] ] { COMP[UTATIONAL] }
{ INDEX }
{ COMP[UTATIONAL]-3 }
( PACKED-DECIMAL }