EGL Reference Guide for iSeries

How COBOL names are aliased

A COBOL name begins with a letter and comprises from one to 30 characters from the following set: letters A-Z, digits 0-9, and the hyphen or minus sign (-).

An EGL part name may be aliased for any of the following reasons:

In all cases, all characters are made upper case.

For a subset of parts (specifically, a program, data table, form, form group, or library), you can specify an alias by assigning a value to the alias property; and if that value is too long or has characters that are not valid in COBOL, an error occurs. If you did not specify a value for the property and if the value of the part name is too long, the part name is truncated to the maximum, which varies by part type:

For the other parts (data items, functions, and records), EGL aliases names as follows:

  1. Each character that is not valid in COBOL is replaced with an X, except that each underscore is replaced with a hyphen (-); for example, TEMP_ITEM becomes TEMP-ITEM
  2. Part names that are longer than a maximum length are changed as follows:

    The maximum length varies by part type:

  3. If after the previous steps the part name is a duplicate name in the program, the prefix described earlier is added to the beginning of the second and any subsequent occurrences of the part name. The resulting alias is truncated to the maximum length as stated above.
  4. If after steps 1-3 the part name matches a COBOL reserved word, the prefix described earlier is added to the beginning of the part name and the resulting alias is truncated to the maximum length as stated above.
  5. If after steps 1-4 the part name begins or ends with a hyphen, the beginning or ending hyphen is changed to X.


Related concepts
COBOL reserved-word file


Related reference
Format of COBOL reserved-word file


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]