Using EXECDROP, EXECLOAD, EXECMAP, and EXECSTAT

The EXECLOAD command loads an exec into storage and prepares the exec for processing. The following command loads TPHONE EXEC into user free storage:
execload tphone exec a
When the exec is subsequently run, the storage resident exec is processed. This eliminates the need for CMS to reload the exec into storage each time the exec is run. The exec remains storage resident during the entire session or until specifically dropped by the EXECDROP command. Be aware that if you make any changes to the exec file on your minidisk or SFS directory, the storage resident copy of the exec remains unchanged. To have the new version processed, you will have to do one of these:
  • Drop the exec from storage (using EXECDROP).
  • Drop the exec from storage (using EXECDROP) and reload it (using EXECLOAD).
  • Load the new version (EXECLOAD with the PUSH option).

Note: Before loading an exec into storage, you should determine whether you are using the CMS installation saved segment and if there is another exec with the same name already in storage. If so, you should do one of these:
  • Specify the PUSH option on the EXECLOAD command.
  • Use the EXECDROP command to drop your access to that exec and then enter the EXECLOAD command, or
    • If EXECMAP shows that the exec has the shared attribute, then use the SET INSTSEG OFF command to discontinue use of the CMS installation saved segment and then enter the EXECLOAD command, or
    • If the exec resides in a logical segment (that is, the SEGNAME field returned from EXECMAP for that exec name is non-blank), then enter a SEGMENT PURGE for the logical segment containing the exec(s).
To verify the existence of the TPHONE EXEC in storage and on your minidisk or SFS directory, you can use the EXECSTAT command. For example:
execstat tphone exec
gives a return code of 0 in register 15, verifying that the exec is storage-resident. The EXECMAP command lists the storage-resident execs.

Entering execmap returns the following if TPHONE EXEC is the only storage-resident exec:

Name      Type     Usage    Records     Bytes     Attribute
TPHONE    EXEC         0         15       512     USER
Should you decide that you no longer require an exec to be storage resident, you can delete it from storage with the EXECDROP command. For example, the following command deletes the TPHONE EXEC from storage:
execdrop tphone exec
Note: When an EXEC or XEDIT macro has been EXECLOADed into storage and the EXEC or XEDIT macro is invoked through a CMSCALL on which a FBLOCK is supplied, the high-order bit of the FBLOCK address must be set on in order for the usage count reported by the EXECMAP to be incremented. For more information on File Block, see z/VM: REXX/VM Reference.