Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Rules for constructing module names

&pagelevel(4)&pagelevel

As far as module names are concerned, a distinction must be made between the element name (i.e. the name of the “container”) under which the module is stored as a library element and the internal module and CSECT names.

If the name of the module is not explicitly specified in the MODULE-OUTPUT option of the COMPILE statement, the element name and the internal module/CSECT names are derived from the name of the source program.

If the name of the module is explicitly specified in the MODULE-OUTPUT option of the COMPILE statement, the element name and the internal module / CSECT names are constructed from that name.

Construction of element names from LLMs in PLAM libraries

  • Derivation from the source program name

    1. The following parts of the source program name, if present, are not used to construct the element name and are therefore dropped: <cat-id>, <user-id>, and the suffixes .C , .CPP, .CXX, .CC or .I (for BS2000 files) and .c, .C , .cpp, .CPP, .cxx, .CXX, .cc, .CC, .c++, .C++, .i or .I (for POSIX files).

    2. If the remaining portion of the source program name exceeds 59 characters, it is truncated from the right to 59 characters.

    3. Special characters not permitted for element names are always converted to “$”. The permitted special characters are $, @, #, . (period), - (hyphen), and _ (underscore). Lowercase letters in POSIX file names are converted to uppercase.

    4. If the source program is read from SYSDTA, the element name is “CSTDMOD”. This applies even if SYSTDA was assigned to a cataloged file or a library element with the ASSIGN-SYSDTA command.

  • Derivation from the explicitly specified name

    In this case, the specified name is accepted as the element name without changes, i.e. the suffix .C , .CPP, .CXX, .CC or .I, if present, is not removed. Similarly, no truncation of the name occurs, i.e. the name can have a length of up to 64 characters.

Special Note
To enable further processing with DBL, the maximum permissible length for the element names of LLMs is currently 32 characters. This applies to the LLM specified in the START-EXECUTABLE-PROGRAM command (module containing the main function) as well as all LLMs to be dynamically linked.
LLMs that have element names which exceed 32 characters must therefore be linked with BINDER.

Construction of LLM object file names in the POSIX file system

  • Derivation from the source program name

    The name of the LLM object file is derived from the name of the POSIX source file as follows: only the suffix.c, .C , .cpp, .CPP, .cxx, .CXX, .cc, .CC, .c++, .C++, .i or .I, if present, is removed from the name of the POSIX source file, and the suffix .o is appended to the remaining portion. No truncation of names or conversion of special characters to the dollar sign “$” and of uppercase to lowercase letters occur.

  • Derivation from the explicitly specified name

    The specified name is accepted without changes. Note, however, that LLM object files must be provided with the suffix .o to enable further processing with the appropriate link editors in the POSIX subsystem.

Construction of the internal module and CSECT names of LLMs

  • Derivation from the source program name

    1. The following parts of the source program name, if present, are not used to construct the module/CSECT name and are therefore dropped: <cat-id>, <user-id> and the suffixes .C , .CPP, .CXX, .CC or .I (for BS2000 files), and .c, .C , .cpp, .CPP, .cxx, .CXX, .cc, .CC, .c++, .C++, .i or .I (for POSIX files).

    2. If the remaining portion of the source program name exceeds 30 characters, it is truncated from the right to 30 characters.

    3. Special characters that are not permitted for internal LLM names are always converted to “$”. The permitted special characters are $, @, # , - (hyphen), and _ (underscore). Lowercase letters in POSIX file names are converted to uppercase.

    4. If the source program is read from SYSDTA, “CSTDMOD” is used as a basis for constructing the name. This also applies if SYSDTA is assigned to a cataloged file or a library element by means of an ASSIGN-SYSDTA command.

    5. The core name obtained by applying rules 1 through 4 is then used to construct the final module and CSECT names by appending a 2-character suffix, i.e. “&@” or “&#”:

      Module name

      <core-name>&@

      Code CSECT

      <core-name>&@

      Data CSECT

      <core-name>&#

  • Derivation from the explicitly specified name

    1. The complete specified name is used to construct the module/CSECT name, i.e. the suffix .c, .C , .cpp, .CPP, .cxx, .CXX, .cc, .CC, .c++, .C++, .i or .I, if present, is not removed.

    2. The truncation of the name from the right to 30 characters, the conversion of invalid special characters to the dollar sign “$”, and the appending of suffixes occurs as described for the derivation from the source program name.

Construction of the names of ii files

An instantiation information file (ii file) is created for each of the source files used by a template, as long as one does not already exist.
The name of this ii file is derived from the associated object and is formed by adding the suffix .ii.
For example, the compiled version of hugo.C would have the ii file hugo.o.ii, unless an object name other than hugo.o is specified.
The ii file is located in that library in which the object file itself is stored.