LOADMOD
Authorization
General User
Purpose
CMS will respect the AMODE and RMODE attributes established by the GENMOD process. When LOADMOD executes, the RMODE attribute assigned to the module at generation time determines whether that file resides above or below the 16MB line. A subsequent START command causes the module to execute with the AMODE established by the GENMOD process. To view the AMODE and RMODE attributes prior to executing the module with the START command, issue the PROGMAP command.
Operands
- fn
- is the file name of the file to be loaded into storage. The file type must be MODULE.
- fm
- is the file mode of the module to be loaded. If not specified, or specified as an asterisk, all your disks are searched for the file.
Options
- NOPRES
- instructs CMS to release the storage occupied by the currently loaded set of non-OS programs. These programs can no longer be referenced by another program. If the module being loaded has the MAP or STR attribute, the LOADMOD command deletes from storage those programs previously loaded by a LOAD, INCLUDE, or LOADMOD command. The default is NOPRES.
- PRES
- instructs CMS to retain the storage that is occupied by the currently loaded set of programs. These programs can still be accessed via hard coded addresses, but are not executable with a START command. The loader tables are rewritten.
- ORIGIN
- hexloc
- instructs CMS to load the specified module into storage at the hexadecimal address specified by hexloc.
Usage Notes
- You can use the LOADMOD command when you want to debug a CMS MODULE file produced by the GENMOD
command with the MAP option. Because CMS MODULE files may be relocatable, you should issue the
PROGMAP command after the file is loaded to help you find the location of the module in virtual
storage. After issuing the PROGMAP
command, you may set address stops or breakpoints before you begin execution with the START command.
For example, enter:
loadmod prog1 progmap cp per instruct range xxxxxx startAnother procedure you can use with modules generated by either the GENMOD command with the NOMAP option or by the BIND command is as follows:
nucxload prog1 nucxmap prog1 cp trace instruct range xxxxxx prog1 … nucxdrop prog1 - If a MODULE file was created using the DOS option of the GENMOD command, the CMS/DOS environment must be active when it is loaded. If it was created using the OS option (the default), the CMS/DOS environment must not be active when it is loaded.
- MODULE files created with the ALL option or with SYSTEM option may be loaded regardless of whether the CMS/DOS environment is active. If the LOADMOD command is called from a program, the loading is also done regardless of whether the CMS/DOS environment is active.
- When in CMS SUBSET mode, a LOADMOD of a nonrelocatable program will result in return code 32.
- Fixed transient area modules have no AMODE or RMODE attributes if they:
- Were created by the LOAD command with the ORIGIN TRANS option
- Used the SYSTEM option from GENMOD
The default is AMODE 24 and RMODE 24. The PROGMAP command does not display the attributes of transient area modules.
- If you load a nonrelocatable program after executing a number of LOADMOD commands, the loader
may detect an attempt to load over a relocatable module, and issue message DMS380E. There are three
possible solutions to this situation:
- Regenerate the nonrelocatable program so it will be relocatable. This is the simplest method.
- Use the ORIGIN option on the LOAD command to change the address where the nonrelocatable program gets loaded to a lower address in storage. This way, the program will reside at an address to be allocated at a later time.
- Execute a LOAD or LOADMOD for the nonrelocatable program first. This will cause relocatable programs to be loaded at locations that do not conflict.
- A nonrelocatable module created above the 16MB line by the LOAD/INCLUDE process will not load on a virtual machine with less than 16MB of storage.
- The ORIGIN option is valid for both relocatable and nonrelocatable modules. However, specifying an ORIGIN address for a nonrelocatable module different from the address where the module was generated may cause unpredictable results when the module is executed. To determine whether a module is relocatable or nonrelocatable and the address where the nonrelocatable module was generated, issue the LOADMOD command without the ORIGIN option, followed by the PROGMAP command. PROGMAP displays the attributes of any non-transient area modules loaded into storage.
- An ORIGIN address located in the transient area (X'E000' to X'10000') will cause the DMS380E message to be issued and the module will not be loaded.
- Specifying the ORIGIN option for a module generated in the transient area will cause the ORIGIN option to be ignored. The module will always load in the transient area.
- Specifying an ORIGIN address not aligned on a doubleword boundary will cause the module to be
loaded at the previous doubleword boundary. For example, issuing
LOADMOD MYPROG (ORIGIN 30003will cause MYPROG to be loaded at 30000. This address will be reflected as the origin address when the PROGMAP command is issued. - If the module cannot be loaded at the address specified on the ORIGIN option, either message DMS380E or message DMS997E will be issued and the module will not be loaded.
Messages and Return Codes
- DMS001E No filename specified [RC=24]
- DMS002E File[(s)] [fn [ft [fm]]] not found [RC=28]
- DMS003E Invalid option: option [RC=24]
- DMS005E No ORIGIN specified [RC=24]
- DMS018E No load map available [RC=40]
- DMS029E Invalid parameter parameter in the option ORIGIN field [RC=24]
- DMS032E Invalid filetype ft [RC=24]
- DMS037E Filemode mode[(vdev)] is accessed as read/only [RC=36]
- DMS069E Filemode mode not accessed [RC=36]
- DMS070E Invalid parameter parameter [RC=24]
- DMS104S Error nn reading file fn ft fm from disk [RC=31│55│70│76│99│100]
- DMS109S Virtual storage capacity exceeded [RC=104]
- DMS114E fn ft fm not loaded; CMS/DOS environment [not] active [RC=40 or -0005]
- DMS116S Loader table overflow [RC=104]
- DMS257T Internal system error at address addr (offset offset)
- DMS380E Storage at origin addr in use, fn not loaded [RC=104]
- DMS639E Error in routine routine, return code was nnn [RC=nnn]
- DMS945E AMODE/RMODE values conflict. file not loaded│generated [RC=68]
- DMS988E Module fn cannot execute in {XA│XC} architecture [RC=64]
- DMS997E The specified ORIGIN was outside of the virtual machine size, LOADMOD ORIGIN failed [RC=46]
- DMS1144E Implicit rollback occurred for work unit workunitid [RC=31]
- DMS1252T Rollback unsuccessful for file pool filepoolid
Additional system messages may be issued by this command. The reasons for these messages and their location are:
| Reason | Location |
|---|---|
| Errors in Shared File System | File Pool Server Messages |
| Errors in using a file | File Error Messages |
