MPE/iX Intrinsics Reference Manual (32650-90875)
Chapter 4 75
Command Definitions (ABORTSESS - FCLOSE)
COMMAND
COMMAND
NM and CM callable.
Programmatically executes a command.
Syntax
CA I16 I16
COMMAND(
cmdimage,cmderror,parmnum
);
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 command:
•If
cmderror
is zero, no error occurred.
•If
cmderror
is negative, a warning was detected.
This 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.
NOTE
When the CI displays multiple errors for a single command,
cmderror
contains only the last error number displayed.
NOTE
Remote commands executed through the COMMAND or HPCICOMMAND
intrinsics may not return a meaningful error status.
parmnum
16-bit signed integer by reference (required)
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.