A session variable can have an integer, Boolean, or character string value. Commands and intrinsics exist to create, alter, access, and delete these variables.
JCWs are session variables that have been created or last altered by one of the JCW commands or intrinsics. These commands and intrinsics accept only integer values in the range of 0 through 65535. The only differences between a JCW and a standard integer variable are the limited value range of JCWs, and an internal "flag," set by the JCW commands and intrinsics, that identifies a variable as a JCW. (Also, JCW names cannot include the underbar character.)
In general, the process of setting up and using any type of variable for IPC is the same. However, if your program utilizes both JCWs and other types of variables, you need to be aware that there are separate commands and intrinsics for JCWs that do not treat standard variables the same way as JCWs. However, the commands and intrinsics for variables treat variables and JCWs the same way, since JCWs are simply a subset of session-level variables. See the section "Special Considerations" at the end of this chapter for more discussion of this subject.
The following list summarizes the commands and intrinsics used to manipulate JCWs and standard variables. These commands and intrinsics are discussed in this chapter within the context of their use in interprocess communication. For a complete discussion of how to set up, use, change, and delete variables and JCWs, refer to Command Interpreter Access & Variables Programmer's Guide (32650-90011).
- :SETVAR
Adds or alters a variable in the variable table. The value can be Boolean, string, or 32-bit integer.
- :SETJCW
Adds or alters a JCW in the variable table. The value must be an integer in the range 0 through 65535.
- :SHOWVAR
Shows specified variable(s) in the variable table, including JCWs.
- :SHOWJCW
Shows specified JCW(s) in the variable table.
- :DELETEVAR
Deletes any user-created variable, including JCWs, from the variable table.
- HPCIPUTVAR
Adds or alters a variable in the variable table. The value can be Boolean, string, or 32-bit integer.
- PUTJCW
Adds or alters a JCW in the variable table. The value must be an integer in the range 0 through 65535.
- HPCIGETVAR
Returns the value of the named variable.
- FINDJCW
Returns the value of the named JCW.
- SETJCW
Sets the JCW named JCW to the value passed.
- GETJCW
Returns the current value of the JCW named JCW.
- HPCIDELETEVAR
Deletes an entry from the variable table.
Variables with integer, string, or Boolean type values can be used for interprocess communication within a job or session. Information, values, and status information can be passed between processes by using variables.