Top  >  Lycia reference  >  Querix 4GL  >  Statements  >  RUN

RUN

 

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:

 

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:

  1. The execution of the parent program is suspended.

  2. The output from the specified command is displayed.

  3. 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.