Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@SYSTEM - Enter system commands

&pagelevel(3)&pagelevel

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
a BS2000 command which is then executed immediately. The EDT session
is then continued provided that the executed system command does not
cause the program to be unloaded (see below). In this case, EDT is
unloaded without regaining control again.

If string is not specified then the EDT session is interrupted. The
/RESUME-PROGRAM or /INFORM-PROGRAM command can be used to
continue the EDT session at the point where it was interrupted by
@SYSTEM (see section “Interrupting an EDT session”). In
uninterruptible system procedures, it is not possible to interrupt the EDT
session in interactive mode.

line

Line number as of which any output from the system command is to be
inserted in the current work file. It is only possible to insert output that the
operating system writes to SYSOUT (this does not include, for example,
formatted output from the /SHOW-FILE command). The command output is
redirected, i.e. the output is written to the current work file and not to
SYSOUT. When this is done, the output is converted from the character set
EDF041 into the character set used by the current work file.

If the output contains characters which are invalid in the current work file's
character set then these characters are replaced by a substitute character
provided that such a character has been specified (see @PAR SUBSTI-
TUTION-CHARACTER); otherwise, the error message EDT5453 is issued.

If line is not specified then the output from the system command is written
as specified in the command itself (usually to SYSOUT). If the command
generates formatted output (e.g. /SHOW-FILE) then it may be necessary to
refresh the work window with [K3] (see section “Function keys in F mode”).

inc

Increment used to form the line numbers which follow line. If inc is not
specified then the increment implicitly specified by line is used (see
section “Implicit increment assignment”).

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.