Loading Text Files into Storage
Loading a text file into storage is simple; you issue the LOAD command specifying the name of a text file you want to load. Determining where the text file gets loaded can be somewhat more complex. Where CMS loads programs depends on a number of factors, including:
- The mode of the virtual machine.
- Whether the file is transient (as specified by the ORIGIN TRANS option of the LOAD command).
- The setting of the SET LOADAREA command. In a 370 virtual machine, the default value of the SET LOADAREA command is LOADAREA=20000. In an XA or XC virtual machine, the default value of the SET LOADAREA command is LOADAREA=RESPECT.
- The residency mode of the program (in XA and XC virtual machines only).
Table 1 summarizes how the various options determine where a program is loaded.
LOAD Command | SET LOAD- AREA Setting | 370 Mode Result | XC or XA Mode Result |
---|---|---|---|
LOAD pgma … | 20000 | CMS loads pgma at X'20000' | CMS loads pgma at X'20000' This overrides the RMODE value (if any) set in the text file. |
LOAD pgma (RMODE 24 | 20000 | CMS loads pgma at X'20000' | CMS loads pgma at X'20000' This overrides the RMODE value (if any) set in the text file. |
LOAD pgma (RMODE ANY | 20000 | CMS loads pgma at X'20000.' | CMS loads pgma at X'20000' This overrides the RMODE value (if any) set in the text file. |
LOAD pgma (ORIGIN TRANS | 20000 | CMS loads pgma at the start of the transient area. | CMS loads pgma at the start of the transient area. |
LOAD pgma (ORIGIN hexloc | 20000 | CMS loads pgma at hexloc. | CMS loads pgma at hexloc. |
LOAD pgma … | RESPECT | CMS loads pgma at the largest available contiguous free storage area. | CMS loads pgma at the largest available contiguous free storage area according to the first RMODE setting in the text file. If RMODE is omitted or if the first RMODE setting in the text file is RMODE 24, CMS loads the program in the largest area below 16MB. If the first RMODE setting in the text file is RMODE ANY, CMS loads the program in the largest area above 16MB. (If CMS encounters a subsequent setting of RMODE 24 in the text file, it stops loading the program above 16MB, issues a message, and starts loading the program below 16MB.) |
LOAD pgma (RMODE 24 | RESPECT | CMS loads pgma at the largest available contiguous free storage area. | CMS loads pgma at largest contiguous free storage area under 16MB. |
LOAD pgma (RMODE ANY | RESPECT | CMS loads pgma at the largest available contiguous free storage area. | CMS loads pgma at largest contiguous free storage area above 16MB (if available). |
LOAD pgma (ORIGIN TRANS | RESPECT | CMS loads pgma at the start of the transient area. | CMS loads pgma at the start of the transient area. |
LOAD pgma (ORIGIN hexloc | RESPECT | CMS loads pgma at hexloc. | CMS loads pgma at hexloc. |
Note:
- The combination AMODE 24/RMODE ANY is invalid. Specifying AMODE 24 and an ORIGIN address greater than 16MB is also invalid.
- In a 370 virtual machine, RMODE and AMODE have no affect on how
CMS loads the program; however, CMS does pass the values on to the
GENMOD process. This lets you develop programs on a 370 virtual machine
for execution on an XA or XC virtual machine.
Only CMS levels prior to CMS Level 12 will execute in a 370 virtual machine.
- Using the INCLUDE command:
- If, after you load a program above 16MB, CMS encounters an RMODE 24 in a text file you INCLUDE, CMS restarts the load process below 16MB. Note that CMS restarts the load in the existing environment—if you change your virtual machine environment (for example, release disks) between the time you LOAD a file and the time you INCLUDE a file, unpredictable results may occur.
- If you specify an ORIGIN address on the INCLUDE command, that address must be on the same side of the 16MB line as the program already loaded; otherwise, the INCLUDE command fails. For example, if you LOAD a program named PIE above 16MB and you attempt to INCLUDE a program named ASLICE at an ORIGIN below 16MB, the INCLUDE command fails and ASLICE does not get loaded; when PIE runs it will be missing ASLICE.
- If you (a) specify an ORIGIN address on the INCLUDE command that requires storage currently occupied by programs loaded with the LOAD command, and (b) issue the START command, unpredictable results may occur.