The PROGRAM-POINTER phrase in the USAGE clause is used to define data of the category “program pointer”.
Syntax rules
The USAGE PROGRAM-POINTER clause should only be specified on level 01. Deviations from this rule are permitted as extensions.
The USAGE PROGRAM-POINTER clause must not be specified at group level in definitions.
The USAGE PROGRAM-POINTER clause must not be specified in the FILE SECTION.
The USAGE PROGRAM-POINTER clause must not be specified in structures in which the EXTERNAL or DYNAMIC clauses are used on level 01.
In the case of data items defined with a USAGE PROGRAM-POINTER clause, no VALUE clause may be specified.
Data items for which there is a USAGE PROGRAM-POINTER clause may not possess a REDEFINES clause and may also not be directly referenced by such clauses. In addition, such data items may also not be present indirectly in any redefined or redefining structure.
Data items and structures for which there is a USAGE PROGRAM-POINTER clause may not be named using a different name (RENAMES clause).
No VALUE clause may be specified at group level in the case of groups that contain data items with a USAGE PROGRAM-POINTER clause.
No condition name (level 88) may be specified for data items having a USAGE PROGRAM-POINTER clause.
The data item specified in the KEY phrase of an OCCURS clause may not be defined using a USAGE PROGRAM-POINTER clause.
General rule
A data item described using the USAGE PROGRAM-POINTER clause has the category “program pointer” and contains the address of a data item. The assumed start value is equal to NULL.