|
|
Getting Started as an MPE/iX Programmer Programmer's Guide: HP 3000 Computer MPE/iX Computer Systems > Chapter 2 Utilities and ToolsProgrammatic Access to the Command Interpreter |
|
Three intrinsics, COMMAND, HPCICOMMAND, and MYCOMMAND, allow programmatic use of the MPE/iX command interpreter (CI). They allow a program other than the CI to:
Some interactive subsystems can programmatically perform these functions without first having to exit their specific subsystem environment (that is, enter break mode). The intrinsics for programmatic use of the CI are:
Command files and user-defined commands (UDCs) are files that allow programmers to develop their own environment. These are discussed in Chapter 1. For detailed information on command files and UDCs, refer to Command Interpreter Access and Variables Programmer's Guide (32650-90011). You can concatenate a string with a prefix or suffix. String substitution in a Command File or a UDC parameter takes precedence over substitution of Command Interpreter-level variables. For example,
purges files ACCT1, ACCT2, ..., ACCT9. You can specify an expression in a Command File or a UDC parameter and an appropriate value will be assigned to it. A Job Control Word (JCW) is one type of predefined variable. On MPE/iX, JCWs are a subset of session-level variables, restricted by values and naming conventions. MPE/iX stores JCWs as integers in the session-level variable table. You can manipulate JCWs with
The commands SETJCW and SHOWJCW correspond to the commands SETVAR and SHOWVAR used on standard variables. DELETEVAR is used to delete JCWs. The intrinsics GETJCW and PUTJCW correspond to the intrinsics HPCIGETVAR and HPCIPUTVAR used on CI variables. MPE/iX distinguishes between the table entries created by the SETJCW command (or the PUTJCW intrinsic) and those created by the SETVAR command (or the HPCIPUTVAR intrinsic). JCW commands and intrinsics usually function like the corresponding variable commands and intrinsics, with a few exceptions, described below. A JCW name can be a maximum of 255 characters long. The first character must be alphabetic. Other characters can be alphabetic or numeric. A JCW name cannot contain the underscore (_) or the wildcard parameters (#, ?, [, and ]). A JCW must be of type integer, with a value in the range 0 to 65535. This is the only difference between JCW names and variable names. For detailed information on naming and dereferencing variables, refer to Command Interpreter Access and Variables Programmer's Guide (32650-90011). Once created, you can change the value of a JCW by using variable or JCW commands and intrinsics. If you assign a value to a JCW that is outside the valid JCW range, then MPE/iX reclassifies it as a standard variable when you assign such a string value to it. You can no longer use JCW commands and intrinsics on it; you must use variable commands and intrinsics to display, change, or delete it. You can force reclassification of a JCW by assigning it a large numeric value. For example,
defines a variable named X as a JCW with value 99. The statement:
gives X the new value of 400, but X remains a JCW. However, when you assign a string value ABC to X with the statement:
then X becomes a variable and not a JCW. MPE/iX informs you of the change with the message:
Two special session-level JCWs named JCW and CIERROR are also system JCWs. Therefore, they cannot be reclassified as session-level variables or deleted. You can change their values with the SETVAR and HPCIPUTVAR commands, but only to assign a new value in the legal range for JCWs. If you attempt to assign a value outside the range, MPE/iX issues the message:
and the initial value remains unchanged. The MPE/iX Help facility is available for commands, User-Defined Commands (UDCs), command files, and program files. Command files and UDCs have two special options for the Help facility: HELP and NOHELP. NOHELP disables the Help facility to provide increased security for UDCs and command files. When NOHELP is active, you can execute a UDC or Command File, but cannot display its contents. HELP is the default option. For detailed information on this topic, refer to Command Interpreter Access and Variables Programmer's Guide (32650-90011). |
|