Appendix A Predefined Variables in MPE/iX
Many variables have been predefined for use by the command interpreter.
They may be used anywhere you would use your own variables. Table A-1
lists all valid predefined variables.
Table A-1. Predefined Variables
-------------------------------------------------------------------------------------------------
| | | | |
| Variable | Type* | Definition | Initial Value |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| CIERROR | W JCW | last CI error number | zero |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPACCOUNT | R S | user's account name | logon account |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPACCTCAP | R I | current account | logon account caps |
| | | capability mask | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPACCTCAPF | R S | current account | logon account caps |
| | | formatted capability | |
| | | mask, for example, | |
| | | "AM, AL, GL, ND, SF, | |
| | | BA, IA" | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPAUTOCONT | W B PL | enables (TRUE); | FALSE |
| | | disables (FALSE) the | |
| | | automatic CONTINUE | |
| | | feature | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCIDEPTH | R I PL | number of nested CIs | 1(=Root CI) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCIERR | W I | last CI error/warning | zero |
| | | in current session | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCIERRCOL | W I | error column number | zero |
| | | for last CI | |
| | | error/warning | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCIERRMSG | R S | textual message for | (null) |
| | | the most recent | |
| | | CIERROR (length of | |
| | | message is 0 for | |
| | | nonexistent CIERROR | |
| | | values) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCMDNUM | R I PL | current command | 1 |
| | | sequence number | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCMDTRACE | W B PL | enables (TRUE); | FALSE |
| | | disables (FALSE) the | |
| | | User Command Tracing | |
| | | facility | |
| | | | |
-------------------------------------------------------------------------------------------------
Table A-1. Predefined Variables (Cont.)
-------------------------------------------------------------------------------------------------
| | | | |
| Variable | Type* | Definition | Initial Value |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCMEVENTLOG | W I | when set to n, | zero |
| | | $STDLIST displays the | |
| | | following n | |
| | | occurrences of | |
| | | tos/reg trap | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCONNMINS | R I | current session | zero |
| | | connect-time in | |
| | | minutes | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCONNSECS | R I | current session | zero |
| | | connect-time in | |
| | | seconds | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCONSOLE | R I | LDEV of the console | console LDEV at logon |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCONTINUE | R B PL | CI's continue state: | FALSE |
| | | FALSE=inactive, | |
| | | TRUE=active | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCPUNAME | R S | name of computer | name of your logon |
| | | model, for example, | computer model |
| | | "SERIES 930" | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCPUMSECS | R I | from root CI = | zero |
| | | current session | |
| | | CPU-time in | |
| | | milliseconds; from | |
| | | other CI or process = | |
| | | current process | |
| | | CPU-time in | |
| | | milliseconds | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCPUSECS | R I | from root CI = | zero |
| | | current session | |
| | | CPU-time in seconds; | |
| | | from other CI or | |
| | | process = current | |
| | | process CPU-time in | |
| | | seconds | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPCWD | R S | current working | logon group and |
| | | directory | account |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPDATE | R I | current day of month | logon day of the |
| | | | month |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPDATEF | R S | current formatted | logon date |
| | | date | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPDAY | R I | current day of the | logon day of the week |
| | | week (1=SUNDAY) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPDTCPORTID | R S | port ID of data | null string |
| | | terminal | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPDUPLICATIVE | R B PL | indicates whether or | as appropriate |
| | | not input operations | |
| | | are echoed to a | |
| | | correspondind device; | |
| | | TRUE (duplicative)= | |
| | | echoing occurs; FALSE | |
| | | (nonduplicative)= no | |
| | | echoing occurs | |
| | | | |
-------------------------------------------------------------------------------------------------
Table A-1. Predefined Variables (Cont.)
-------------------------------------------------------------------------------------------------
| | | | |
| Variable | Type* | Definition | Initial Value |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPERRDUMP | W I PL | number of errors to | zero |
| | | be dumped from | |
| | | process error stack | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPERRTOSLIST | W B PL | controls destination | TRUE |
| | | of CI error messages: | |
| | | TRUE=errors written | |
| | | to $STDLIST, | |
| | | FALSE=errors written | |
| | | to $STDERR | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPEXECJOBS | R I | number of jobs and | number of jobs and |
| | | sessions currently in | sessions in EXEC |
| | | EXEC (executing) | state |
| | | state | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPFILE | R S | currently executing | null string |
| | | UDC or command file | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPGROUP | R S | current group name | logon group name |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPGROUPCAP | R I | current group | logon group caps |
| | | capability mask | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPGROUPCAPF | R S | current group | logon group caps |
| | | formatted capability | |
| | | mask, for example, | |
| | | "IA,BA,PH" | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPHGROUP | R S | home group name | home group |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPHOUR | R I | current hour number | logon hour |
| | | (24-hour clock) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPINBREAK | R B PL | FALSE=not in BREAK; | FALSE |
| | | TRUE=in BREAK mode | |
| | | (includes process | |
| | | BREAK and rit BREAK) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPINPRI | R I | input priority | logon input priority |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPINTERACTIVE | R B PL | interactive (TRUE); | as appropriate |
| | | noninteractive | |
| | | (FALSE) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPINTRODATE | R S | formatted job/session | date of logon |
| | | logon date | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPINTROTIME | R S | formatted job/session | time of logon |
| | | logon time | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPJOBCOUNT | R I | number of jobs | logon number of |
| | | executing | executing jobs |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPJOBFENCE | R I | fence value for | logon jobfence |
| | | waiting jobs | |
| | | | |
-------------------------------------------------------------------------------------------------
Table A-1. Predefined Variables (Cont.)
-------------------------------------------------------------------------------------------------
| | | | |
| Variable | Type* | Definition | Initial Value |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPJOBLIMIT | R I | current job limit | job limit at logon |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPJOBNAME | R S | name of current | logon job name |
| | | job/session | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPJOBNUM | R I | job/session number, | your job/session |
| | | for example, 12 | number |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPJOBTYPE | R S | "S"=session, "J"=job | your job type |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPLASTJOB | W S | job ID of the job you | null string |
| | | most recently | |
| | | streamed in the form | |
| | | #Jnnnn | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPLASTSPID | R S | spoolfile ID for the | spoolfile ID of last |
| | | job identified in the | job |
| | | HPLASTJOB variable | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPLDEVIN | R I | LDEV number for | logon input LDEV |
| | | $STDIN | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPLDEVLIST | R I | LDEV number for | logon output LDEV |
| | | $STDLIST | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPLOCIPADDR | R S | IP address of a | null string |
| | | remote client | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPLOCPORT | R I | TCP port number for | 0 if local client; |
| | | network service | otherwise standard |
| | | provided to the | port used by service |
| | | client | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPMINUTE | R I | current minute number | logon minute |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPMONTH | R I | current month number | logon month |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPMSGFENCE | W I PL | fence for the level | 0=all errors and |
| | | of error messages | warnings are printed |
| | | printed by the CI: | |
| | | 0=errors/warnings, | |
| | | 1=errors only, 2=no | |
| | | error/warning | |
| | | messages | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPNCOPIES | R I | number of $STDLIST | copies subparm of the |
| | | copies for jobs | outclass= parm of the |
| | | | JOB command |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPOSVERSION | R S | operating system | current full version |
| | | version ID (identical | ID of the operating |
| | | to the middle version | system |
| | | string in the SHOWME | |
| | | banner | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPOUTCLASS | R S | output device class | logon output device |
| | | | class |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPOUTFENCE | R I | output fence value | logon output fence |
| | | | value |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPPATH | W S | search path for | "!HPGROUP,PUB,PUB.SYS,|
| | | command files and | ARPA.SYS" |
| | | implied RUN | |
| | | | |
-------------------------------------------------------------------------------------------------
Table A-1. Predefined Variables (Cont.)
-------------------------------------------------------------------------------------------------
| | | | |
| Variable | Type* | Definition | Initial Value |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPPIN | R I | Process | PIN for the root CI |
| | | Identification Number | |
| | | for the executing | |
| | | process | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPPROMPT | W S | CI's prompt string | ":" (colon) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPQUIET | R B | indicates if session | FALSE |
| | | is accepting | |
| | | messages: FALSE= | |
| | | accepting messages; | |
| | | TRUE= not accepting | |
| | | messages ("quiet") | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPREDOSIZE | W I PL | number of entries in | 20 |
| | | the CI's redo stack | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPRELVERSION | R S | operating system | current full version |
| | | release version ID | ID of the operating |
| | | (identical to the | system |
| | | left version string | |
| | | in the SHOWME banner | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPREMIPADDR | R S | IP address of the | null string |
| | | remote user | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPREMPORT | R I | TCP port number, | 0 if local client; |
| | | assigned by the | otherwise the |
| | | client, used on an | assigned TCP port |
| | | incoming connection | number |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPRESULT | W S I or B | value of the most | zero |
| | | recent CALC command | |
| | | evaluated (for | |
| | | example, "abc", 12, | |
| | | TRUE) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSCHEDJOBS | R I | number of jobs | number of jobs in |
| | | currently in SCHED | SCHED state |
| | | state (scheduled | |
| | | state) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSESCOUNT | R I | number of sessions | logon number of |
| | | executing | sessions executing |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSESLIMIT | R I | current session limit | session limit at |
| | | | logon |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSPOOLID | R S | spoolfile ID of the | job spoolfile ID |
| | | current job | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSTDIN | R S | file name for job or | $STDIN |
| | | session input | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSTDLIST | R S | file name for job or | $STDLIST |
| | | session output | |
| | | listing | |
| | | | |
-------------------------------------------------------------------------------------------------
Table A-1. Predefined Variables (Cont.)
-------------------------------------------------------------------------------------------------
| | | | |
| Variable | Type* | Definition | Initial Value |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSTREAMEDBY | R S | user and account name | logon ID of the |
| | | of the person who | person who streamed |
| | | streamed a job or | the job |
| | | invoked STARTSESS; if | |
| | | "the person" is the | |
| | | initial OPERATOR.SYS | |
| | | logon or a job | |
| | | streamed from the | |
| | | SYSSTART.PUB.SYS | |
| | | file, the job or | |
| | | session ID is | |
| | | replaced by the | |
| | | string SYSTEM PROCESS | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSUSAN | R I | unique serial number | unique serial number |
| | | assigned at the | assigned to your |
| | | factory to each | system at manufacture |
| | | system for use by | |
| | | software | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSUSPJOBS | R I | current number of | numbers of jobs in |
| | | jobs in SUSP state | SUSP state at logon |
| | | (suspended) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPSYSNAME | W S | name of computer | null string (" ") |
| | | system | |
| | | (user-definable) | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPTIMEF | R S | current formatted | logon time |
| | | time | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPTIMEOUT | W I PL | number of minutes for | zero |
| | | CI reads (<=0 means | |
| | | no timeout). When | |
| | | this expires on a CI | |
| | | read, session is | |
| | | logged off. | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPTYPEAHEAD | W B | indicates whether or | FALSE. |
| | | not typeahead is | |
| | | turned on; the BYE or | |
| | | SETVAR commands reset | |
| | | this variable to | |
| | | FALSE. | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPUSER | R S | current user name | logon user |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPUSERCAP | R I | current user's | logon user caps |
| | | capability mask | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPUSERCAPF | R S | current user's | logon user caps |
| | | formatted capability | |
| | | mask, for example, | |
| | | "IA,BA,PH" | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPUSERCMDEPTH | R I PL | number of nested UDCs | zero |
| | | and/or command files | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPUSERCOUNT | R I | number of current | 0 if user-based |
| | | online users | pricing is not |
| | | | installed; otherwise |
| | | | the number of current |
| | | | users |
| | | | |
-------------------------------------------------------------------------------------------------
Table A-1. Predefined Variables (Cont.)
-------------------------------------------------------------------------------------------------
| | | | |
| Variable | Type* | Definition | Initial Value |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPUSERLIMIT | R I | limit of number of | -1 if user-based |
| | | online users | pricing is not |
| | | | installed; otherwise |
| | | | the user limit number |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPVERSION | R S | MPE/iX version id | current MPE/iX |
| | | (v.uu.ff) | version |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPWAITJOBS | R I | current number of | number of jobs |
| | | jobs waiting | waiting at logon time |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| HPYEAR | R I | last two digits of | logon year number |
| | | the current year | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| JCW | W JCW | job control word | zero |
| | | (variable) | |
| | | | |
-------------------------------------------------------------------------------------------------
Variable Types *
R READ ONLY variable (cannot be modified).
W READ/WRITE variable (can be modified).
JCW A standard MPE/iX JCW.
I Integer format.
B Boolean format (TRUE/FALSE).
S String (ASCII) format.
PL Process Local. Modifications exist only for the
locality of the process.
If a PL variable is changed by a process it returns to its original value
when the process terminates. For example, if you logon and set
HPREDOSIZE (the number of entries in the CI's redo stack) to 25 and then
run a program which sets it to 30 (using the COMMAND or HPCICOMMAND
intrinsics) the variable will have the value 30 for that process only.
When the process terminates the value of this variable for your session
remains at the value it was before the program was run (in this case 25).
PL (process local) variables are not programmatically accessible with the
HPCIGETVAR, HPCIPUTVAR, and HPCIDELETEVAR intrinsics. They may be
programmatically accessed only with the COMMAND or HPCICOMMAND
intrinsics.
[REV BEG]
Note that HPTYPEAHEAD cannot be set inside a job.[REV END] All
user-created variables may be modified and deleted. However,
Hewlett-Packard predefined variables may not be deleted.
JCWs may be considered integer variables with legal values ranging from 0
to 65,535 and with bits 16 and 17 (bit 0 being the leftmost bit of 32
bits) having special interpretations (for example, if bit 16 is set, the
JCW setting is FATAL) and with bits 0 through 15 reserved.