System()

Executes a single command or command session from within Open GENIE.

SYSTEM [command=String] Execute system commands from within Open GENIE

example:

	# find some user details on VMS
	>> system "$ SEARCH journal.txt \"flux\" "
	IRS14142ZAB/NJR Flux tests  18-FEB-1997 12:00:01 163.2
	IRS14143ZAB/NJR Flux tests  18-FEB-1997 13:43:40   6.1
	>>

Note: The Dir() command in Open GENIE is simply a procedure written using the System() command.

System

The System() command allows a user to execute native operating system commands from within Open GENIE. This can be very useful for accessing facilities not actually built into Open GENIE. To make a procedure Operating system independent, use the Os() command to choose which system command to use, see the example below.

PROCEDURE TIME
IF Os() = "VMS"
    system "show time"
ELSE   # assume Unix
    system "date"
ENDIF
ENDPROCEDURE

If no command is given as a parameter, the System() command starts a sub-shell process which must be terminated with an "exit" on Unix or a "LOGOUT" on VMS. This is a handy form of the command if you just want to type a few commands without closing down your Open GENIE session. Note that on VMS some normal logical name definitions may be missing in the sub process.

Parameters:

Command (String)

The command to be executed by the operating system.

RESULT = (Integer)

The execution status returned by the command.