====== RTI_RUN_COMMAND Subroutine ====== ==== Description ==== This subroutine will invoke the specified DOS command, returning generated output and error codes (if available). ==== Syntax ==== call RTI_RUN_COMMAND(//cmdLine//, //workingDir//, //stdOut//, //stdErr//, //exitCode// ) ==== Parameters ==== The subroutine has the following parameters: ^Parameter^Description^ |//cmdLine//|A fully qualified command line, containing the command to execute and any parameters it requires| |//workingDir//|The path to use as the working directory when invoking the command| |//stdOut//|(Optional) The variable that will return any output generated by the command| |//stdErr//|(Optional) The variable that will return any error output generated by the command (if it sends such error output to the "standard Error" device| |//exitCode//|(Optional) The variable that will return the exit code specified by the command (if the command terminates with an exit code)| ==== Example ==== * Invoke a PHP routine to generate a web page and capture its results parms = phpPath:" ":Drive():"\":scriptPath:"\":scriptName:" ":queryString directory = Drive():"\" output = '' stdErr = '' rti_Run_Command( PARMS, DIRECTORY, OUTPUT, stdErr ) * look for crlf$ crlf$ in the output n1 = Index(output, \0D0A0D0A\, 1)