8.55 DIAG8CMD (
Display or set DIAGNOSE 8 command option)

8.55.1 Function

The DIAG8CMD command 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 commands issued using the Diagnose 8 interface will be traced at the console. This may be
useful for programs that routinely issue console commands using the Diagnose 8 interface. If no argu-
ment is given, DIAG8CMD displays the current settings.

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’.

8.55.2 Syntax

Descriptive

[ ]]

Diagram

¬¬¬ ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ




¬¬¬ ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬«










¬¬¬¬«








8.55.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 together with
NOECHO.

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 together with
DISABLE.


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.

8.55.4 Examples

Example 1:

Display the current DIAG8CMD settings.

HHC00013I Herc command: 'diag8cmd'

HHC02203I DIAG8CMD : disable, no echo

Figure 112: DIAG8CMD command (display current settings)

Example 2:

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.

HHC00013I Herc command: 'diag8cmd enable echo'

Figure 113: DIAG8CMD command (set new DIAG8CMD mode)

Previous Page Next Page