#include <qp0z1170.h> int Qp0zSystem( const char *CLcommand );
The Qp0zSystem() function spawns a new process, passes CLcommand to the CL command processor in the new process, and waits for the command to complete. The command runs in a batch job so it does not have access to a terminal.
This function is similar to the system() function provided by ILE C, but allows a program to safely run a CL command from a multithreaded process. Note that if CLcommand fails, the global variable _EXCP_MSGID is not set with the exception message id.
The user calling Qp0zSystem() must have *USE authority to the specified CL command.
| 0 | The specified CL command was successful. |
| 1 | The specified CL command was not successful. |
| -1 | Qp0zSystem() was not successful. |
See Code disclaimer information for information pertaining to code examples.
The following example shows how to use the Qp0zSystem() function to create a library.
#include <stdio.h>
#include <qp0z1170.h>
int main(int argc, char *argv[])
{
if (Qp0zSystem("CRTLIB LIB(XYZ)") != 0)
printf("Error creating library XYZ.\n");
else
printf("Library XYZ created.\n");
return(0);
}
Library XYZ created
| Top | UNIX-Type APIs | APIs by category |