Using LINK
The general form of the TSO LINK command is:
Input to the LINK command
LINK program2.obj LIB('CEE.SCEELKED')'CEE.SCEELKED' in
the LIB operand. It is not required during the execution of a z/OS® XL C/C++ program.LIB operand of the LINK command
LINK program2.obj LIB('CEE.SCEELKED.', 'SALESLIB.LIB.SBRT2')A
request coded this way searches CEE.SCEELKED and SALESLIB.LIB.SBRT2 to
resolve external references.LOAD operand of the LINK command
LINK LOAD(load-mod-name(member)) LIB('CEE.SCEELKED')The load module produced by the linkage editor must be a member in a partitioned data set.
If you do not specify a data set name for the load module, the system constructs a name by using
the first data set name that appears after the keyword LINK, and it will be placed in a member of the
user-prefix.program-name.LOAD data set. If the input data
set is sequential and you do not specify a member name, TEMPNAME is used.
Example: The following example shows how to link-edit two object modules and place the
resulting load module in member TEMPNAME of the
userid.LM.LOAD data set.
LINK program1,program2 LOAD(lm)You can also specify link-edit options in the link statement:
LINK program1 LOAD(lm) LETOptions for the linkage editor are discussed in Output from the linkage editor.
For more information about using the TSO command LINK, see z/OS TSO/E Command Reference.
Specifying link-edit options through the TSO LINK command
SMITH.PROGRAM1.OBJ is
placed in SMITH.PROGRAM1.LOAD(LM), enter: LINK SMITH.PROGRAM1 'LOAD(LM) MAP LET NCAL'LINK PROGRAM1 MAP PRINT(*)Storing load modules in a load library
If you want to link C functions, to store them in a load library, and to INCLUDE them later with main procedures, use the NCAL and LET linkage editor options.
