Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


USAGE clause

The USAGE clause specifies the format in which data is represented in storage.

Format 1
Read syntax diagramSkip visual syntax diagram>>-+---------------+--+-BINARY--+--------+---------------+-----><
   '-USAGE--+----+-'  |         '-NATIVE-'               |  
            '-IS-'    +-COMP--+--------+-----------------+  
                      |       '-NATIVE-'                 |  
                      +-COMP-1--+--------+---------------+  
                      |         '-NATIVE-'               |  
                      +-COMP-2--+--------+---------------+  
                      |         '-NATIVE-'               |  
                      +-COMP-3--+-------------+----------+  
                      |         |        (1)  |          |  
                      |         '-NATIVE------'          |  
                      +-COMP-4--+--------+---------------+  
                      |         '-NATIVE-'               |  
                      +-COMP-5--+-------------+----------+  
                      |         |        (1)  |          |  
                      |         '-NATIVE------'          |  
                      +-COMPUTATIONAL--+--------+--------+  
                      |                '-NATIVE-'        |  
                      +-COMPUTATIONAL-1--+--------+------+  
                      |                  '-NATIVE-'      |  
                      +-COMPUTATIONAL-2--+--------+------+  
                      |                  '-NATIVE-'      |  
                      +-COMPUTATIONAL-3--+-------------+-+  
                      |                  |        (1)  | |  
                      |                  '-NATIVE------' |  
                      +-COMPUTATIONAL-4--+--------+------+  
                      |                  '-NATIVE-'      |  
                      +-COMPUTATIONAL-5--+-------------+-+  
                      |                  |        (1)  | |  
                      |                  '-NATIVE------' |  
                      +-DISPLAY--+--------+--------------+  
                      |          '-NATIVE-'              |  
                      +-DISPLAY-1--+--------+------------+  
                      |            '-NATIVE-'            |  
                      +-INDEX----------------------------+  
                      +-NATIONAL--+-------------+--------+  
                      |           |        (1)  |        |  
                      |           '-NATIVE------'        |  
                      +-| objref phrase |----------------+  
                      +-PACKED-DECIMAL--+-------------+--+  
                      |                 |        (1)  |  |  
                      |                 '-NATIVE------'  |  
                      +-POINTER--------------------------+  
                      +-PROCEDURE-POINTER----------------+  
                      '-FUNCTION-POINTER-----------------'  
 
objref phrase:
 
|--OBJECT REFERENCE--+--------------+---------------------------|
                     '-class-name-1-'  
 

Notes:
  1. The NATIVE phrase is treated as a comment for COMP-3, COMPUTATIONAL-3, COMP-5, COMPUTATIONAL-5, NATIONAL, and PACKED-DECIMAL data items.

The USAGE clause can be specified for a data description entry with any level-number other than 66 or 88.

When specified at the group level, the USAGE clause applies to each elementary item in the group. The usage of elementary items must not contradict the usage of a group to which the elementary items belongs.

A USAGE clause must not be specified in a group level entry for which a GROUP-USAGE NATIONAL clause is specified.

When a GROUP-USAGE NATIONAL clause is specified or implied for a group level entry, USAGE NATIONAL must be specified or implied for every elementary item within the group. For details, see GROUP-USAGE clause.

When the USAGE clause is not specified at either the group or elementary level, a usage clause is implied with:

For data items defined with the DATE FORMAT clause, only usage DISPLAY and COMP-3 (or its equivalents, COMPUTATIONAL-3 and PACKED-DECIMAL) are allowed. For details, see Combining the DATE FORMAT clause with other clauses.


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)