HP C/iX Library Reference Manual (30026-90004)

Chapter 5 359
HP C/iX Library Function Descriptions
system
system
Executes an MPE/iX command.
Syntax
#include <stdlib.h>
int system (const char *
string
);
Parameters
string
A pointer to a string containing an MPE/iX command.
Return Values
0 Success.
<0 An error occurred. The value returned is the negated value of the error
code returned by the HPCICOMMAND intrinsic.
>0 A warning occurred.
Description
The system function executes an MPE/iX command pointed to by
string
. The command
can include UDCs and command files. The command is executed as if
string
has been
entered at a terminal. The current process waits until the command completes.
This function is implemented by calling the MPE/iX system intrinsic HPCICOMMAND.
Several commands are not executed when using this function. Refer to the description of
HPCICOMMAND in the MPE/iX Intrinsics Reference Manual for a description of these
commands.
All error and warning messages resulting from the execution of the command are printed
to $STDLIST.
See Also
ANSI C 4.10.4.5