The general form of the TSO LINK command is:
>>-LINK--+-data-set-name-----------+----------------------------> | .-,-------------------. | | V | | '---(--data set name--)-+-' >--+---------------------------+--LIB---------------------------> '-LOAD--(--data set name--)-' >--+-data-set-name-----------+--------------------------------->< | .-,-------------------. | | V | | '---(--data-set-name--)-+-'
LINK program2.obj LIB('CEE.SCEELKED')
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.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.
LINK program1,program2 LOAD(lm)
LINK program1 LOAD(lm) LET
Options 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 .
LINK SMITH.PROGRAM1 'LOAD(LM) MAP LET NCAL'
LINK PROGRAM1 MAP PRINT(*)
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.