April 1, 1981 Modify instructions and constants in a
length Jf the file to accomodate
Incl]de control section statements}. TEXT file, and change the
modifications (Replace and Chanqe the entry point (ENTRY statement). Nallify external reference so that it does not receive control
when it is called, and you do not receive an error message when it is encountered (LIBRARY statement). These statements are also described under the LOAD command in When VOl lJad a sinqle TEXT file or a TXTLIB member into storage for execution, the default entry point is the first CSECT name in the object
file You can specify a different entry point at which to start execution either on the LOAD (or INCLUDE) command line with the RESET option: mvproq (reset beta
where is the alternate entry point of your proqram, or you can soecify the entry point on the START line:
start beta When you load multiple TEXT files (either explicitly or implicitly,
bv the loader to resolve external references), you also have
the option of specifyinq the entrv point on the LOAD, or START command lines.
If vJU do not specifically name an entry point, the loader determines
the entry point for you, according to the following hierarchy:
1. An entrv point specified on the START command
2. The last entry specified with the RESEr option on a LOAD or INCLUDE command
3. The name on tre last ENTRY statement that was read
4. The name on the last LDT statement that contained an entry name was read s. The name on the first assembler-or compiler-produced END statement read 6. The first byte of the first control section loaded For example, you load a series of TEXT files that contain no
control statements, and do not specify an entry point on the LOAD, INCLUDE, or commands, execution begins with the first file that
vou If you want to control the execution of program subroutines,
you ShOlli be aware of this hierarchy when you load proqrams or when you place them in 148 VM/370 User's Guide
An area of particular concern is when you issue a dynamic load (with
the OS LINK, LOAD, or ICTL macros) from a program, and you call members
of CMS TITLIBs. The CMS loader determines the entry point of the called
program and returns the entry point to your program. If a TITLIB member
that you load has a VCON to another TITLIB member, the LDT card from the
second member may be the last LDT card read by the loader. If this LDT
card specifies the name of the second member, then CMS may return that
entry point address to your program, rather than the address of the
first member.
CREATING PROGRAM MODULES When your programs are debugged and tested, you can use the LOAD and INCLUDE commands, in conjunction with the GENMOD command, to create
program modules. A module is a nonrelocatable file whose external
references have been resolved. In CMS, these files must have a filetype
of MODULE. To create a program module, load the TEIT files or TITLIB members
into storage and issue the GENMOD command:
load create analyze print genmod process In this example, PROCESS is the filename you are assigning the
module; it will have a filetype of MODULE. You could use any name; if you use the name of an existing MODULE file. the old one is replaced.
To execute the program composed of the source files CREATE, ANALYZE, and PRINT, enter:
process
If PROCESS requires input and/or output files, you will have to define
these files before PROCESS can execute properly; if PROCESS expects
arguments passed to it, you can enter them following the MODULE name;
for example:
process testl
For more information on creating program modules, see "Section 13.
Programming for the CMS Environment." USING EIEC PROCEDURES During your program development and testing cycle, you may want to
create EIEC procedures to contain sequences of CMS commands that you execute frequently. For exaaple, if you need a number of MACLIBs, TITLIBs, and file definitions to execute a particular program, you might
have an EIEC procedure as follows:
Section 8. Developing OS programs Under eMS 149
Previous Page Next Page