RUN

RUN statement is used to specify a command line for the operating system to execute.

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]

When you specify the program name and its path, be careful with its case.

UNIX is case-sensitive, so it will treat files which names come in different cases as separate files.

 

The RUN statement has these 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.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.