Using CMOD CLIST to invoke the TSO/E LINK command

You can use CMOD to build C modules or C ILC applications where C is the main routine. CMOD invokes the TSO/E LINK command by passing all CMOD parameters to that command. Any parameters not passed from CMOD have the normal LINK command default values. The CMOD CLIST resides in CEE.SCEECLST. The CMOD CLIST cannot be used to link XPLINK applications.

Read syntax diagramSkip visual syntax diagram
Syntax

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

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

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

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

OBJ
Specifies input object data set names.
LOPT
Specifies a string of linkage editor options.
LIB
Specifies libraries that you want to use to resolve external references. These libraries are appended to the default C library functions.
LOAD
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 LOAD(TEMPNAME).

Table 1 shows CMOD calls and their corresponding results:

Table 1. CMOD calls
Call Result
cmod obj(myobj) link userid.myobj lib(cee.sceelked)
cmod obj(myobj) lib (mylib) lopt(rmode(24) amode(24)) link userid.myobj lib(userid.mylib cee.sceelked) rmode(24) amode(24)
cmod obj(myobj) lib (mylib) load(myload) lopt(amode(24)) link userid.myobj lib(userid.mylib cee.sceelked) load(myload) amode(24)
Possible error messages are:
  • CMOD: NO INPUT OBJECT DECK SPECIFIED (rc=16)
  • CMOD: ERROR WITH INPUT OBJECT DECK (rc=16)
  • Any error messages generated by LINK