A SERVICE OF

logo

Chapter 7 565
Command Definitions S-SO
SETVAR
Note that all variables are global, so the CI variable name should not be the same as the
JCW name that is being used or the operation of the code that uses that JCW will be
affected.
Compound logical expressions can be formed using the AND, NOT, XOR, and OR logical
operators, and nested within parentheses.
The Boolean value of the keyword TRUE or FALSE is overridden if there is a variable of
the same name. For example, to store the string value 'ABC' in X, enter:
SETVAR TRUE 'ABC'
SETVAR X TRUE
The SETVAR command may be used to set the command interpreter's search path
(HPPATH), the command interpreter's prompt (HPPROMPT), and all other variables. You use
SHOWVAR to see all the variables that were created by the user. Issuing SHOWVAR @ causes
the display of every predefined and user-defined variable.
Use
This command may be issued from a session, job, program, or in BREAK. Pressing Break
terminates an INPUT ( ) function.
Example
To change the command interpreter prompt to your username.accountname, enter:
SETVAR HPPROMPT "!HPUSER.!HPACCOUNT:" or
SETVAR HPPROMPT HPUSER+"."+HPACCOUNT+":"
The result is the same regardless of which form of the command you use.
Related Information
Commands DELETEVAR, INPUT, SETJCW, SHOWJCW, SHOWVAR
Manuals Appendix A, "Predefined Variables in MPE/iX"
Appendix B, "Expression Evaluator Functions"