How COBOL names are aliased

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

An EGL part name is aliased if that part name demonstrates one of the following characteristics:
  • Invalid COBOL characters
  • Lowercase letters
  • Is longer than a maximum length
  • Is not unique in the program
  • Is a COBOL reserved word.

In all cases, characters in the alias are all upper case.

For certain parts, such as programs, data tables, services, forms, form groups, or libraries, 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 data tables, 7
  • For forms, 8
  • For form groups, 6
  • For libraries, 8
  • For z/OS® programs, 8
  • For iSeries® main programs, 7
  • For iSeries® called programs, 8
  • For services, 7

EGL always aliases function names to En, where n is a one-to-five-digit number that is unique within the program.

EGL aliases variable names as follows:
  • 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_VAR becomes TEMP-VAR.
  • If the name begins with a hyphen, the first character is changed to an X. For example, _TEMP_VAR2 becomes XTEMP-VAR2.
  • If necessary, the name is truncated as follows:
    • Record names are truncated to a maximum of 10 characters.
    • Field names and other variable names are truncated to a maximum of 18 characters.
  • A hyphen is appended to the name and then followed by a one-to-five-digit number that is unique within the program. For example, MY_CUSTOMER_RECORD becomes MY-CUSTOME-12345.