Slide 48 of 80
Notes:
HPCICOMMAND is a user-callable system level API that executes the command passed in as the cmdimage argument. Cmdimage is identical to that passed to the COMMAND intrinsic, except that it can name UDCs, scripts and program filenames, in addition to most of the built-in MPE commands. Due to implementation constraints the following built-in commands cannot be executed via COMMAND or HPCICOMMAND: ABORT, BYE, CHGROUP, DATA, DISMOUNT, DO, EOD, EOJ, EXIT, HELLO, IMF, IMFMGR, JOB, LISTREDO, MOUNT, NRJE, REDO, RESUME, RJE, SETCATALOG, VSUSER.However, the remaining 245 CI commands can all be executed programmatically via COMMAND or HPCICOMMAND.
It is recommended to call the HPCICOMMAND intrinsic as a simple way for a program to provide a “window” to the CI. It is common for MPE programs to accept a leading colon (“:”) to indicate that what follows is a CI command to execute, and not a command recognized by the program. A nice feature of HPCICOMMAND is that it executes UDCs, which makes the “window” to the CI more natural and powerful for the end user.
The error argument and parm arguments work the same as in COMMAND, except HPCICOMMAND will set the CIERROR and HPCIERR CI variables to 0, or an error number if the passed in command fails.
The optional msglevel parameter is unique to HPCICOMMAND and controls the HPMSGFENCE setting described in the COMMAND notes. By default msglevel is passed as 0, meaning that all CI errors and warning messages are written to $STDLIST, just as if cmdimage was executed interactively. Msglevel can be set to any legal HPMSGFENCE value and causes HPCICOMMAND to control error, warning and some diagnostic output identically to how the CI interprets HPMSGFENCE. Entering HELP hpmsgfence will show the details.