MPE/iX Intrinsics Reference Manual (32650-90905)

322 Chapter7
Command Definitions (HP32208-HPLOACNMPROC)
HPCICOMMAND
HPCICOMMAND
NM callable only.
Executes a command programmatically.
Syntax
CA I16 I16 I16V
HPCICOMMAND(
cmdimage,cmderror
,
parmnum,msglevel
);
Parameters
cmdimage
character array (required)
Passes an ASCII string of <=511 characters consisting of a command and
parameters, terminated by a carriage return. The carriage return
character (%15) must be the last character of the command string. Do not
include a prompt character in this string.
cmderror
16-bit signed integer by reference (required)
Returns any error code set by the last executed command. When the CI
displays multiple errors for a single command,
cmderr
contains only the
last error number displayed.
•If
cmderror
is zero, no error occurred.
•If
cmderror
is negative, a warning was detected.
This is the same error that would be returned by the command interpreter
if
cmdimage
were executed interactively or in batch. The error message can
be found in message set two of CATALOG.PUB.SYS.
Remote commands executed through the COMMAND or HPCICOMMAND
intrinsics may not return a meaningful error status.
parmnum
16-bit signed integer by reference (optional)
Returns a number indicating the error:
•If
parmnum
is positive, it is a file system error number and
cmderror
is
non-zero.
•If
parmnum
is negative, it is the column number where the error
occurred and
cmderror
is non-zero. (The command interpreter (CI)
prints a caret there.)
•If
parmnum
is zero, then no additional error-related data is available.