- The USAGE clause may be written in any data description entry with a level number other than 66 or 88.
- If the USAGE clause is written in the data description entry for a group item, it may also be written in the data description entry for any subordinate elementary item or group item, but the same usage must be specified in both entries.
- An elementary data item whose declaration contains, or an elementary data item subordinate to a group item whose declaration contains, a USAGE clause specifying COMPUTATIONAL
, BINARY, PACKED-DECIMAL
, COMPUTATIONAL-3
, COMPUTATIONAL-4
, or COMPUTATIONAL-5
must be declared with a PICTURE character-string that describes a numeric item (i.e. a PICTURE character-string that contains only the symbols "P", "S", "V", and "9"). See the topic
The PICTURE Clause.
An elementary data item whose declaration contains no USAGE clause and that is subordinate to a group item whose declaration contains a USAGE clause specifying a format from the list may be declared with a PICTURE character-string that describes an alphabetic, alphanumeric, alphanumeric-edited or numeric-edited data item.
- An elementary data item whose declaration contains, or an elementary data item subordinate to a group item whose declaration contains, a USAGE clause specifying COMPUTATIONAL-5
or COMPUTATIONAL-X
must be declared with a picture character-string that describes a numeric item
or describes an alphanumeric item with a size of between one and eight bytes inclusive. If it describes an alphanumeric item of size 1, 2, 3, 4, 5, 6, 7, or 8 bytes, then this is equivalent to specifying an integer item with 2, 4, 7, 9, 12, 14, 16 or 18 decimal digit positions respectively
.
When COMPUTATIONAL-X is specified and the PICTURE character-string describes a numeric item, then that item must be unsigned.
- The BLANK WHEN ZERO, JUSTIFIED and SIGN clauses must not be specified for data items whose usage is not explicitly or implicitly DISPLAY.
- The SYNCHRONIZED and VALUE clauses must not be specified for data items whose usage is INDEX.
The SYNCHRONIZED clause can be specified for data items whose usage is INDEX.
- COMP is an abbreviation for COMPUTATIONAL.
COMP-1 is an abbreviation for COMPUTATIONAL-1.
COMP-2 is an abbreviation for COMPUTATIONAL-2.
COMP-3 is an abbreviation for COMPUTATIONAL-3.
COMP-4 is an abbreviation for COMPUTATIONAL-4.
COMP-5 is an abbreviation for COMPUTATIONAL-5.
COMP-X is an abbreviation for COMPUTATIONAL-X.
- An index item can be referenced explicitly only in a SEARCH or SET statement, a relation condition, the USING phrase of a Procedure Division,
the USING statement of an ENTRY statement,
an intrinsic function argument
the USING phrase of an INVOKE statement, an inline method invocation argument
an INITIALIZE statement
or the USING phrase of a CALL statement.
-
A pointer
or procedure-pointer
item can be referenced explicitly only in a SET statement, a relation condition, a CALL statement, the USING phrase of a Procedure Division, the USING statement of an ENTRY statement
an INVOKE statement, the argument list of an inline invocation of a method, the argument list of a function,
- An elementary data item described with usage INDEX,
OBJECT,
POINTER,
or PROCEDURE-POINTER
EVENT-POINTER, MONITOR-POINTER, MUTEX-POINTER, PROCEDURE-POINTER, SEMAPHORE-POINTER or THREAD-POINTER
clause must not be a conditional variable.
- Typedef-name-1 must be previously defined in the same source file as a record with the TYPEDEF clause.
- If USAGE typedef-name-1 is specified, the following clauses cannot also be specified:
- BLANK
- JUSTIFIED
- PICTURE
- SIGN
- SYNCHRONIZED
- VALUE
- It is an error to specify USAGE typedef-name-1 if there is an explicit USAGE clause at a higher level in the same hierarchy.
- It is an error to specify any subordinate items (items with a higher level number other than 78) immediately following an item defined with USAGE typedef-name-1.
- The USAGE OBJECT REFERENCE clause must not be specified in the data description entry for a group item, but may be specified on subordinate elementary data items.
-
The USAGE OBJECT REFERENCE clause must not be specified in the File Section.
The USAGE OBJECT REFERENCE clause can be specified in the File Section.
Note: Whether the object reference still references an active object depends on the application logic.
- The ACTIVE-CLASS phrase can be specified only in a factory definition, object definition, or method definition.
- A data item whose usage is EVENT-POINTER can be referenced explicitly only in a CLOSE statement, an OPEN statement, a SET statement, a WAIT statement or a USING phrase.
- A data item whose usage is MONITOR-POINTER, MUTEX-POINTER, or SEMAPHORE-POINTER can be referenced explicitly only in a CLOSE statement, an OPEN statement, a SET statement or a USING phrase.
- A data item whose usage is THREAD-POINTER can be referenced explicitly only in a START statement, a WAIT statement or a USING phrase.
- An elementary data item whose description contains, or an elementary data item subordinate to a group item whose description contains, a USAGE NATIONAL clause must be declared with a picture character-string that describes a national or national-edited data item.
- When a USAGE clause is not specified for an elementary data item or for any group to which the data item belongs:
- if the explicit or implicit picture character-string contains the symbol 'N', a USAGE NATIONAL clause is implied;
- otherwise, a USAGE DISPLAY clause is implied.
- A USAGE clause with the OBJECT REFERENCE, POINTER, or PROGRAM-POINTER phrase must be specified only for an elementary data item with level 1.
This restriction is not enforced.
- If program-prototype-name-1 is specified, the TYPEDEF clause must be specified for the subject of the entry.
This restriction is not enforced.
- The NATIONAL phrase must be specified in a USAGE clause associated with an elementary data item whose explicit or implicit picture character-string contains the symbol 'N'.
- A USAGE clause with the CONDITION-VALUE phrase must be specified only for an elementary data item with level 1.
- If the EVENT phrase is specified, then class-name-1 shall reference a delegate definition and the FACTORY phrase shall not be specified.