Command files, like UDCs, can be created to execute single or multiple commands. Unlike UDCs, only one routine can be included in a command file.
Creating a Command File |
 |
Any editor can be used to create a command file and to modify or delete a portion of it. The file name is used to invoke the command file. There is no cataloging procedure for a command file.
Command files are often used to test a new user command before
establishing it as a UDC. Because they are easier to create and
modify than UDCs, command files are also used to execute user commands
that change frequently. Command files are not as secure as UDC files
because they can be deleted inadvertently with the PURGE command
(unless it is protected with a lockword, program security, or access
rights).
The PURGE command permits you to delete files using wildcard
specifications, with levels of confirmation. Refer to
MPE/iX Commands Reference Manual
(32650-90003).
For information on HFS (hierarchical file system) security provisions, refer to
New Features of MPE/iX: Using The
Hierarchical File System
(32650-90351).
Specifying Options for Command Files |
 |
The RECURSION and LOGON options specified for UDCs are not applicable to command files. Other options available with UDCs can be used in command files.
If a command, UDC, or another command file is called from a command file, the standard search path is used: UDCs, built-in MPE/iX commands, command or program files. The RECURSION option, therefore, is unnecessary for command files.
Command files cannot be invoked automatically when a user logs on to the system. A command file can be executed at logon, however, by calling the command file through a logon UDC.