To link-edit a relocatable module from a DOS private library and add
linkage editor control statements to it, you could use this procedure:
1. Identify the library and use the RSERV com.and to copy the
relocatable module into a CMS TEXT file. In this example, the module RTNC is to be copied from the library OBJ.MODS: assgn sysrlb e
dlbl ijsysrl e dsn obj mods (sysrlb
rserv rtnc
2. Create a DOSLNK file, insert the linkage editor control statements,
and copy the TEXT file created in step 1 into it using the GETFILE
subcommand:
edit rtnc doslnk
input action reI getfile rtnc text a
file
3. Invoke the linkage editor with the DOSLKED command:
doslked rtnc mydoslib
Alternatively, you could create a DOSLNK file with the following
records: ACTION REL INCLUDE RTNC
and link-edit the module directly from the relocatable library. If you
do not need a copy of the module on a CftS disk, you might want to use
this method to conserve disk space. When the linkage editor is reading modules, it may encounter a blank
card at the end of a file, or a * (comment) card at the beginning of a
file. In either case, it issues a warning message indicating an invalid
card, but continues to complete the link-edit.
LINKAGE EDITOR OUTPUT: CMS DOSLIBS The CMS/DOS linkage editor always places the link-edited executable
phase in a CMS library with a filetype of DOSLIB. You should specify
the filename of the DOSLIB when you enter the DOSLKED command:
doslked progO templib
where PROGO is the relocatable module you are link-editing and TEftPLIB is the filename of the DOSLIB. If you do not specify the name of a DOSLIB, the output is placed in a DOSLIB that has the same name as the DOSLNK or TEXT file being
link-edited. In the above example, a CftS DOSLIB is created named TEMPLIB DOSLIB, or, if the file TEMPLIB DOSLIB already exists, the phase PROGO is added to it. DOSLIBs can contain relocatable core image phases suitable for
execution in CMS/DOS. Before you can access phases in it, you must
identify it to CMS with the GLOBAL command:
global doslib templib per.lib
174 IBM VM/370 eMS User's Guide
Page of GC20-1819-2 As Updated April 1, 1981 by TNL GN25-0826 When CMS is searching for executable phases, it searches all DOSLIBs specified on the last GLOBAL DOSLIB command line. If you have named a
number )f DOStIBs, or if any particular DOSLIB is very large, the time requirei for CMS to fetch and execute the phase increases. You should
use 5eparate DOSLIBs for executable phases, whenever possible, and then specify only the DOSLIBs you need on the GLOBAL command. When you link-edit a module into a DOSLIB that already contains a
phase with the same name, the directory entry is updated to point to the
new phase. However, the space that was occupied by the old phase is not
reclaimed. You should periodically issue the command: d051ib comp libname where libname is the filename of the DOSLIB, to compress the DOSLIB and
delete unused space.
The DOSLKED command also produces a linkaqe editor map, which it writes
into a file with a filename that is that of the name specified on
the DOSLKED command line and a filetype of MAP. The filemode is always AS. If vou do not want a linkaqe editor map, use the N)MAP option on
the statement in a DOSLNK file.
Executing Programs in eMS/DOS After y)U have assembled or compiled a source program and link-edited
the TExr files, you can execute the phases in your CMS virtual machine. You may not, however, be able to execute all your D)S programs directly
in There are a number of execution-time restrictions placed on your
virtual machine by VM/370. You cannot execute a program that uses: • !'1ultitaskinq • than one partition • Teleprocessinq • ISAM macros to read or write files • C'S module files created by DOS programs
The abowe is only a partial list, representing those restrictions with
which y)U might be concerned. For a complete list of restrictions, see
the and the usage notes on
the FETCH command in the EXECryTING DOS PHASES You can loaa executable phases into your virtual machine using the FETCH c)mmand. Phases must be link-edited before you load them; they
must have been link-edited with REL. When you issue the FETCH command, you specify the name of the phase to be loaied: fetch mvorog Then YOl can beqin executing the program by issuing the START command: st:lrt Section 9. Developing DOS Proqrams under eMS 175
Previous Page Next Page