RUN
The RUN statement transfers processing control from the current process to an external program.
RUN
END? FAIL
(1)
(2) (3) (4) (5) (6)
(2) Application ID |
(3) Program name or field containing it |
(4) Occurrence (constant/index) |
(5) End current process first? (Y/N) |
(6) Fail action (0=nothing, 1=warning, 2=error, 3=cancel) |
If the designer specifies that a RUN is not required and the invocation fails, the next true/false flag is set to F. If the invoked process completes successfully, the next true/false flag is set to T. If the process cannot be invoked successfully, the FAIL parameter determines what additional action to take.
RUN is used to invoke an external program in the same way that it would be invoked from the operating system command processor. As parameters are passed using the PASS statement, they are assigned a number. Each parameter can be referred to in the command line by using dollar sign ($) plus the parameter number. Using dollar sign ($) plus * refers to any unused remaining parameters. If no dollar signs ($) are used, APPX ignores all parameters. If you need to use a dollar sign ($) in the command line, precede it with a backslash (\). On the DOS platform, use ~ (tilde).
The END? parameter is presently ignored.
If you PASS a file to the RUN statement, APPX supplies the full operating system path name.
The value returned from a RUN function is put in the four-byte binary predefined field RETURN CODE.
The RUN statement passes the current PASS list, if any. Refer to the PASS Lists section for details.
In the following example, RUN is used to invoke the operating systems display utility. The name of this program is stored in the field OS DISPLAY UTILITY in application ABC.
RUN ABC OS DISPLAY UTILITY END? Y FAIL 3