Examples:

MAXRATES MIDNIGHT

IPL 0148

12.2.2 PAUSE

Descriptive

nnn nnn.nnn

Diagram

Êʬ¬¬ ¬¬¬§¬¬¬¬¬ nnn ¬¬¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ



nnn.nnn

A pause command is supported in order to introduce a brief delay before reading and processing the next
line in the file. The value nnn can be any number from 1 to 999 and specifies the number of seconds to
delay before reading the next line. Beginning with Hercules version 4.0 pause can also be specified for
sub-second delays (e.g. "PAUSE 0.125" to delay the next command for 125 milliseconds).

Examples:

PAUSE 2

PAUSE 0.375

12.2.3 # (Silent Comment)

Descriptive

# [
comment]

Diagram

Êʬ¬¬ # ¬¬¬ comment ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ

Lines starting with '#' are treated as "silent comments". They are intended as comments just for the run-
commands file itself and are thus not logged to the console. That means they are are not visible when
Hercules is started and the run-commands file is executed.

Examples:

# ====================================================

# This comment block will not be logged to the console

# ====================================================

12.2.4 * (Loud Comment)

Descriptive

* [
comment]

Diagram

Êʬ¬¬ * ¬¬¬ comment ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ

Lines starting with '*' are treated as "loud comments". They will be logged to the console and thus are
visible when the run-commands file is executed.

Examples:

* ================================================

* This comment block will be logged to the console

* ================================================

12.3 Automating Hercules Startup

Creative use of the run-commands file can completely automate Hercules startup. The next figure shows
a sample run-commands file that does the following:

“pause 1” Wait one second before processing the first Hercules command. (1) “cmdlevel all” Set the current command group to ALL. This allows that all Hercules commands
can be issued. (2)
“help” Display all valid commands for the chosen command group that has been set before with
CMDLEVEL. (3)
“maxrates midnight” Set the MAXRATES reporting interval to midnight to have the MIPS and
I/O statistics issued date aligned. (4)
“sh startgui "D:\MVS\TERMINALS.BAT" Execute the named batch file in the shell to start a
couple of tn3270 sessions. See details below. (5)
“pause 3” Wait three seconds until all tn3270 sessions have been successfully connected. (6)
Previous Page Next Page

Extracted Text (may have errors)

12. The Run-Commands File

12.1 Function

Hercules supports the ability to have console commands automatically executed at startup via the 'run-
commands' file. If the run-commands file is found to exist when Hercules starts then each line of the file is
read and interpreted as a console command, exactly as if the command were entered from the HMC sys-
tem console.

The default filename for the run-commands file is "hercules.rc". The default name may be overridden by
setting the "HERCULES_RC" environment variable.

Except for the 'pause' command (see below), each command read from the run-commands file is logged
to the console preceded by a “>”' (greater-than sign) character. Thus you can easily distinguish between
console commands entered from the keyboard from those entered via the run-commands file.

Comment lines starting with '#' are treated as "silent comments" and are thus not logged to the console
whereas comment lines starting with '*' are treated as "loud comments" and will be logged.

12.2 Run-Commands File Statements

There is a number of different types of commands that can be specified within a run-commands file.
These commands are the following:

“herccmd” (any valid Hercules console command) PAUSE (delay the processing of the next command) # (issue silent comment) * (issue loud comment)

12.2.1 Hercules Console Commands

Descriptive

herccmd

Diagram

Êʬ¬¬ herccmd ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ

In the run-commands file any valid Hercules console command (“herccmd”) can be specified. This in-
cludes the ‘sh’ (shell) command. Each command that is read from the run-commands file is logged to the
console preceded by a ‘>’' (“greater-than” sign) character. This is to distinguish between console com-
mands entered manually from the keyboard from thosecommands entered via the run-commands file.

Examples:

MAXRATES MIDNIGHT

IPL 0148

12.2.2 PAUSE

Descriptive

nnn nnn.nnn

Diagram

Êʬ¬¬ ¬¬¬§¬¬¬¬¬ nnn ¬¬¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ



nnn.nnn

A pause command is supported in order to introduce a brief delay before reading and processing the next
line in the file. The value nnn can be any number from 1 to 999 and specifies the number of seconds to
delay before reading the next line. Beginning with Hercules version 4.0 pause can also be specified for
sub-second delays (e.g. "PAUSE 0.125" to delay the next command for 125 milliseconds).

Examples:

PAUSE 2

PAUSE 0.375

12.2.3 # (Silent Comment)

Descriptive

# [
comment]

Diagram

Êʬ¬¬ # ¬¬¬ comment ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ

Lines starting with '#' are treated as "silent comments". They are intended as comments just for the run-
commands file itself and are thus not logged to the console. That means they are are not visible when
Hercules is started and the run-commands file is executed.

Help

loading