BBjInterpreterServer::serverExec
Description
In BBj 4.0 and higher, this method executes a command on the server machine.
Syntax
Return Value |
Method |
---|---|
int |
serverExec(string commandString) |
int |
serverExec(BBjVector commandLine) |
Parameters
Variable |
Description |
---|---|
commandString |
Specifies the command line to be executed. |
commandLine |
In BBj 14.0 and higher, specifies the command and arguments in elements of the BBjVector. |
Return Value
Returns the process return code from the operating system.
Remarks
This method is equivalent to invoking SCALL(), except BBj will ignore SETOPTS bit 8, $08$ and always execute the command on the server.
BBj supports two types of server executions: synchronous and asynchronous. In a synchronous server execution, the interpreter waits until the command is completed to resume operation. This is the default operation. In an asynchronous execution, the interpreter does not wait for the command to complete before resuming operation. To invoke a server command asynchronously, insert an ampersand (&) as the last character in the command line.
The BBjVector version of this method prevents the operating system shell from interpreting special characters in the command or arguments. Each argument will be passed verbatim to the command. If an argument contains quotes, these quotes will be passed to the OS-specific call and will not be further processed by BBj.
Example
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.