ibm:vm370-lib:cmshelp:reslib.helpcmd
RESLIB
CMS Commands
- reslib.helpcmd.txt
RESLIB CMS Transient command Use the RESLIB command to load compiled programs into virtual storage and establish them as CMS commands. The format of the RESLIB command is: +----------+------------------------------------------------------------------+ | RESLIB | Allocate pages [(Allocate options...[)]] | | | Delete *|name | | | List [*|name] [(List options...[)]] | | | LOad fname [(Load options...[)]] | | | | | | Allocate options: | | | KEY nn NAME name PERM | | | List options: | | | STACK Type|NOType | | | Load options: | | | NAME name PERM SYStem | +----------+------------------------------------------------------------------+ where: Allocate pages allocates one or more pages (of 4,096 bytes) from the program resident library for use as a work space. 'pages' must be between 1 and 256. Delete * | name deletes one or more previously allocated work spaces or loaded programs and to make their storage available to CMS. '*' specifies that all work spaces and loaded programs not marked with the PERM option are to be deleted. 'name' specifies the name of the work space or program which is to be deleted. The work space or program is deleted even if it is marked with the PERM option. List [* | name] displays one or more resident program library entries. '*' specifies that all resident program library entries are to be displayed. This is the default. 'name' specifies that only the resident program library entry with the given name is to be displayed. LOad fname loads a program into the resident program library and establishes it as a CMS command. 'fname' specifies the name of the file to be loaded into the resident program library. The file must have a filetype of TEXT and consist of serially reuseable relocatable object code such as produced by the OS language processors. If a GLOBAL TXTLIB command has been issued, fname may indicate the name of a TXTLIB member. Allocate Options: KEY nn specifies the storage protect key to be assigned to the work space. 'nn' must be a number between 0 and 15. If the KEY option is not specified, the work space is assigned the USER key (KEY 14). NAME name specifies a unique 1-to-8-character name to be associated with the work space. The name may not already exist in the resident program library. If the NAME option is not specified, a unique name is automatically generated. PERM specifies that the allocated space is only deleted when the name is used in the RESLIB DELETE command. If PERM is not specified, the work space is deleted when the RESLIB DELETE * command is issued. List Options: STACK specifies that the display of the LIST function is to be placed in the console input stack FIFO. TYPE specifies that the display of the LIST function is to be typed at the terminal. This is the default if STACK is not specified. NOTYPE specifies that no output from the LIST function is to be typed at the terminal. This is the default if STACK is specified. Load Options: NAME name specifies a 1-to-8-character name which is to be assigned to the library entry. The name may not already exist in the library. If a name is not specified, the TEXT filename, fname, is used instead. PERM specifies that the entry is only deleted when the name is used in the RESLIB DELETE command. If PERM is not specified, the entry is deleted when the RESLIB DELETE * command is issued. SYSTEM specifies that the program storage area is to be assigned the SYSTEM protect key (KEY 15). Additionally, the program will be given a PSW key of 0 and the system mask will be disabled for all interrupts. If the SYSTEM option is not coded, the program storage area is assigned the USER key (KEY 14), and the program will be invoked with a protect key of 14 and a system mask enabled for all interrupts. Usage Notes: 1. The RESLIB command allows you to load a CMS program into a special storage area reserved for resident routines. This storage area may only be freed with the RESLIB DELETE command. The routines and the storage area are collectively called the "resident program library". Once a program is loaded, whenever CMS attempts to load a MODULE file during command resolution, it will first search the resident program library for a program with the same name. If a matching routine is found, it is executed. Otherwise, CMS will attempt to find a MODULE file with the same name so that it can be loaded and executed. In effect, the RESLIB command allows you to define additional CMS nucleus resident routines. You can also use the RESLIB command to replace existing CMS transient and user area commands with corresponding resident routines. 2. If RESLIB ALLOCATE command is invoked from a program, upon successful allocation register 1 contains the starting address of the work space. 3. If RESLIB LIST command is invoked from a program, upon completion register 1 contatins the starting address of the work space or entry point address of a program with the matching name. Use the NOTYPE option to prevent any output from being typed at the terminal. 4. If RESLIB LOAD command is invoked from a program, upon successful load register 1 contains the starting address of the loaded program. 5. RESLIB LOAD uses the CMS LOAD command to load the program into the resident program library. RESLIB specifies the CLEAR, NOMAP, NOTYPE, INV, REP, AUTO, LIBE, and DUP loader options. Refer to the CMS LOAD command for information on these options. 6. Only serially reuseable program should be placed in the resident program library. Most programs produced by high level language compilers (e.g. PL/I) are not serially reuseable and may cause unpredictable results. The GCC compiler produces serially reusable programs if you do not make use of static variables that are initialized at compile-time. 7. The NAME option allows you specify the name of the command which is to cause the invocation of the progam. You may use the CMS SYNONYM command to specify valid abbreviations for the command name. 8. If the program to be loaded would have been generated with the GENMOD SYSTEM option, the LOAD SYSTEM option should be specified in order to avoid protection exceptions. 9. RESLIB was written by Andrew Hanushevsky, Langmuir Laboratory, Cornell University in 1980. Responses: RESLIB LIST produces the following response. Note that the heading is not placed in the console input stack if the STACK option is specified. ENTRY ID E.P.A. PAGE AMT KEY ATTRIBUTES name aaaaaa bbb ccc dd [PERM] [SYS] * * * * * * * * * * * * * * * * * * * * * The fields are: name specifies the work space name or the program name in the resident program library. aaaaaa specifies the starting address of a work space or the entry point address of a loaded program in hexadecimal. bbb specifies the starting page number, in hexadecimal, of the work space or loaded program. ccc specifies the number of pages, in decimal, allocated to the work space or loaded program. dd specifies the storage protect key, in decimal, assigned to the work space or loaded program. PERM specifies that the work space or loaded program has been marked with the PERM option. SYS specifies that the entry is a loaded program and will be invoked with a storage protect key of 0 and a system mask disabled for all interrupts.
ibm/vm370-lib/cmshelp/reslib.helpcmd.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator