USAGE clause

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

Format 1

Read syntax diagramSkip visual syntax diagramUSAGEISBINARYNATIVECOMPNATIVECOMP-1NATIVECOMP-2NATIVECOMP-3NATIVECOMP-4NATIVECOMP-5NATIVECOMPUTATIONALNATIVECOMPUTATIONAL-1NATIVECOMPUTATIONAL-2NATIVECOMPUTATIONAL-3NATIVECOMPUTATIONAL-4NATIVECOMPUTATIONAL-5NATIVEDISPLAYNATIVEDISPLAY-1NATIVEINDEXNATIONALNATIVEUTF-8NATIVEobjref phrasePACKED-DECIMALNATIVEPOINTERPOINTER-32PROCEDURE-POINTERFUNCTION-POINTER
objref phrase
Read syntax diagramSkip visual syntax diagramOBJECT REFERENCE class-name-1
Note: NATIVE is treated as a comment in all phrases for which NATIVE is shown in the USAGE clause.

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:

  • Usage DISPLAY when the PICTURE clause contains only symbols other than G or N
  • Usage NATIONAL when the PICTURE clause contains only one or more of the symbol N and the NSYMBOL(NATIONAL) compiler option is in effect
  • Usage DISPLAY-1 when the PICTURE clause contains one or more of the symbol N and the NSYMBOL(DBCS) compiler option is in effect