The @SYSTEM statement can be used to interrupt (like [K2]) the EDT session or to execute an operating system command without interrupting the EDT session.
Operation | Operands | F mode, L mode |
@SYSTEM | [string [TO line [(inc)] ] ] |
string | String containing the command that is to be executed. The system expects If |
line | Line number as of which any output from the system command is to be If the output contains characters which are invalid in the current work file's If |
inc | Increment used to form the line numbers which follow |
The @SYSTEM statement is one of the EDT statements with security implications (see also section “Access protection”). The statement is rejected in uninterruptible system procedures in interactive mode and on input from a file (read with RDATA
from SYSDTA
not equal to SYSCMD
, execution of a start procedure).
The command can be written with or without the leading slash. Before being passed to the operating system, the command string is converted from the input source's character set into the character set UTFE
.
It is only permissible to specify commands that can also be issued using the CMD
macro. If a command is not permitted at the CMD
interface or in the current SDF syntax file then it is rejected with the error message EDT4300
(which also contains the message key from the command return code). The commands permitted for use with the CMD
macro are described in the Executive Macros User Guide [12].
Some system commands cause the program to be unloaded when used via the CMD
interface (e.g. /EXIT-JOB
, /LOGOFF
, /HELP-SDF
, /CALL-PROCEDURE
, /START-PROGRAM
, /LOAD-PROGRAM
or user commands defined by means of SDF-A and implemented using command procedures). For a full overview of these commands, see the Executive Macros User Guide [12]. It is advisable to avoid unloading EDT due to this type of command since open files are not closed and there is no opportunity to write back unsaved work files.
Example
The output from the /SHOW-SYSTEM-INFORMATION
command is to be used to obtain information about the OSD version.
The relevant information is stored in the work file.