SHUTDOWN
ANSI
The SHUTDOWN instruction provides a method for terminating program execution and returning control to the operating system. Optionally, it may pass a command line to the operating system (such as a utility name, batch file, or other command) for execution. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
command
Required. A previously defined Character String Variable, a string Literal, or a character string ARRAY element containing the command line executed.
Flags Affected: NONE
Note the following:
If {command} is a string variable, only the Logical String contents are utilized.
The program currently executing is terminated and control is returned to the operating system.
If {command} is provided and it is not a Null String, it is placed in the key ahead buffer for execution once the operating system takes control. The command line's execution status is only limited by the operating system's criteria for executable command lines.
If the command fails to execute when using PLBWIN or SUNDB86A, SHUTDOWN automatically attempts to execute the command using the current COMSPEC keyword if available.
The command line may be limited to 127 bytes or may not be supported by some operating systems (although functional under true MS-DOS and Linux compatible systems). Note: If ANSI.SYS is not loaded the command line is limited to 15 bytes. Note: Programs running with Windows-Style runtimes fall into the "Unsupported" category.
When a SHUTDOWN is performed in a GUI environment with a command to execute, a new process is created for the command. If a '!' character starts the command line, the process is started in an iconized state.
If a FILEPI instruction is active, it is terminated.
See Also: BATCH, EXECUTE, FORK, ROLLOUT, System Interface Instructions
![]() |