Previous Topic: Naming StandardsNext Topic: PL/1 Procedure and Label Names


PL/1 Field Names

Program field names should follow the rules laid out in the naming convention.

The names of fields should, wherever possible, be the same as those in the file from which they are obtained. This helps to standardize the field naming, and also makes the mapping of fields between files clearer. Any reference to a field should normally be qualified by the name of the structure to which it belongs, wherever possible (for example, if not subject to the restrictions of other HLLs).

Otherwise, build up externally defined names from three-character OS/400-style mnemonics:

ALWDLT FIL CUSCDE

Use suffixes to indicate the data type as appropriate:

VNM CHR PTR

Name control variables based on files and data structures by the based-on structure name and a suffix:

For the names of fields that act as accumulators, use an appropriate prefix or suffix appended to the name of the field being accumulated. This helps to make the mapping of a field from format to format, clear. For example: