Top > Lycia reference > Querix 4GL > Statements > RUN
To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
RUN statement is used to specify a command line for the operating system to execute.
Element |
Description |
Command |
A quoted character string or a variable of character data type |
Display Mode |
The display mode: either IN LINE or IN FORM |
RETURNING Clause |
A clause that returns the termination status code of the executed command |
The RUN statement executes an operating system command. It can be used to run another 4GL application from the first one. When the command invoked by the RUN statement terminates (that is when the second 4GL program is terminated), 4GL resumes the execution of the parent application that contains the RUN statement.
The RUN statement is followed by the command. The command can be represented by:
a quoted character string that specifies the name of the program and the pathname if necessary
a variable of CHAR, VARCHAR or STRING data type (it can also be a record member of character data type or an element of a program array of character data type) that contains the name of the program and the pathname if necessary
The example below executes a command line which is specified in an element of an array:
RUN my_arr[i]
The RUN statement has the following effects, unless the WITHOUT WAITING keywords are specified:
The execution of the parent program is suspended.
The output from the specified command is displayed.
The execution of the parent 4GL application is restored, the previous 4GL window is restored.
If the RUN statement contains the WITHOUT WAITING clause, only the third action from the above list is executed. The command invoked with the WITHOUT WAITING clause is usually executed without affecting the visual display.