Under TSO/E

The Language Environment prelinker is started under TSO/E through an IBM-supplied CLIST called CPLINK, which invokes the prelinker and creates an executable module. If you want to create a reentrant C/C++ load module, link-edit C/C++ or COBOL object modules using long names, or create a DLL application, you must use CPLINK instead of the TSO/E LINK command.

The CPLINK command has the following syntax:

Read syntax diagramSkip visual syntax diagram
Syntax

>>-CPLINK--OBJ--(--+------------------+--)---------------------->
                   |    .-,------.    |      
                   |    V        |    |      
                   '-'----object-+--'-'      

>--+-----------------------------------+------------------------>
   '-POPT--(--+-------------------+--)-'   
              |    .-,-------.    |        
              |    V         |    |        
              '-'----options-+--'-'        

>--+-----------------------------------+------------------------>
   '-PLIB--(--+-------------------+--)-'   
              |    .-,-------.    |        
              |    V         |    |        
              '-'----libname-+--'-'        

>--+-----------------------------------+------------------------>
   '-LOPT--(--+-------------------+--)-'   
              |    .-,-------.    |        
              |    V         |    |        
              '-'----options-+--'-'        

>--+----------------------------------+------------------------->
   '-LIB--(--+-------------------+--)-'   
             |    .-,-------.    |        
             |    V         |    |        
             '-'----libname-+--'-'        

>--+----------------------------------+------------------------><
   '-LOAD--(--+------------------+--)-'   
              |    .-,------.    |        
              |    V        |    |        
              '-'----object-+--'-'        

OBJ
Specifies an input data set name. This is a required parameter. Each input data set must be one of the following:
  • A C object module compiled with the RENT or LONGNAME compiler options
  • A C object module that has no static external data
  • A COBOL object module
POPT
Specifies a string of prelink options. The prelinker options available for CPLINK are the same as for batch. For example, if you want the MAP option to be used by the prelinker, specify the following:
CPLINK OBJ('dsname') POPT('MAP')...

When the prelink MAP option is specified (as opposed to the link option MAP), the prelinker produces a file showing the mapping of static external data. This map shows name, length, and address information. Any unresolved references or duplicate symbols during the prelink step are displayed in the map.

PLIB
Specifies the library names used by the prelinker for the automatic library call facility.
LOPT
Specifies a string of linkage editor options. For example, if you want the prelink utility to use the MAP option and the linkage editor to use the NOMAP option, use the following CLIST command:
CPLINK OBJ('dsname') POPT('MAP') LOPT('NOMAP...')
LIB
Specifies any additional library or libraries used by the TSO/E LINK command to resolve external references. These libraries are appended to the default language library functions.
LOAD
Specifies an output data set name. If you do not specify an output data set name, a name is generated for you. The name generated by the CLIST consists of your user prefix followed by CPOBJ.LOAD(TEMPNAME).