5.27 DIAG8CMD (DIAGNOSE 8 command option)

5.27.1 Function

This parameter specifies whether a command issued through Diagnose 8 will be executed by Hercules as
a Hercules commands or not. An optional second argument can be specified to request whether the com-
mands issued using the Diagnose 8 interface will be traced at the console. This may be useful for pro-
grams that routinely issue console commands using the Diagnose 8 interface.

Caution: Enabling this feature may have security consequences. When this feature is enabled it is
possible for guest operating systems running under Hercules to issue commands directly to the host
operating system by means of the Hercules ‘sh’ (shell) command. This ability may be disabled via the
SHCMDOPT statement.

Note: There are some commands that are being prevented from being used by the Diagnose 8 interface.
The list of commands that may not be executed by means of Diagnose 8 can be found in

Appendix D.
Hercules Command Groups
under the column ‘NODIAG8’.

5.27.2 Syntax

Descriptive

Diagram

¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ















¬¬¬

5.27.3 Parameter

DISABLE

Commands issued through the Diagnose 8 interface will generate a Specification
Exception program interrupt on the issuing CPU. This is the default.

ENABLED

Commands issued through the Diagnose 8 interface will be executed by Hercules
as Hercules commands.

ECHO

When ECHO is specified, a message is issued as the console is about to issue the
command, the command is redisplayed as if it was entered through the console in-
put line, and a final message is issued to indicate the command completed.

NOECHO

When NOECHO is specified, no such messages are displayed and the command
completes silently, except for the output of the command itself if the Diagnose 8
interface did not request a response buffer. This is the default.

The value of ECHO or NOECHO has no effect on command output being placed into a response buffer if
the Diagnose 8 interface requested one.

5.27.4 Examples

Example 1:

Specify that commands issued through the Diagnose 8 interface are executed as Hercules commands.
Additionally issue a message, as the console is about to execute the command, then redisplay the com-
mand itself and give a final message, indicating the command has completed.

DIAG8CMD ENABLE ECHO

Previous Page Next Page