Symbol name

Assigned value

Example string

BDATE

Hercules build date

‘Sep 22 2010’

BTIME

Hercules build time

’19:13:03’

CUU

3 digit device number, upper case hexadecimal digits

‘12A’

CUUU

4 digit device number, upper case hexadecimal digits

‘012A’

cuu

3 digit device number, lower case hexadecimal digits

‘12a’

cuuu

4 digit device number, lower case hexadecimal digits

‘012a’

DEVN

4 digit device number, upper case hexadecimal digits

‘012A’

HOSTARCH

Host system architecture

‘i686’

HOSTNAME

Name of the host system

‘GOOFY’

HOSTNUMCPUS

The number of CPUs of the host system

‘MP=8’

HOSTOS

Host operating system

‘Windows’

HOSTOSREL

Host operating system release

‘6.1.7600’

HOSTOSVER

Host operating system version

‘7 Ultimate Edition, 64-bit’

MODNAME

Module name of the startup program

‘hercules.exe’

MODPATH

Path name of the startup program

‘D: \Hercules\’

VERSION

Hercules version

3.07’

Table 3: Predefined symbols

4.7.3.2 Environment variables

If a symbol is not explicitly defined by a DEFSYM statement and an environment variable by the same
name exists, then the string contents of that environment variable will be used for substitution.

4.7.3.3 Undefined symbols

If a symbol is not defined by an explicit DEFSYM, is not an automatically generated symbol or is not an
environment variable, an empty string will be substituted.

4.7.4 Escaping substitution, recursion

To specify the '$’ string without incurring substitution an additional '$' sign should be used. For example,
$$(FOO) will not be substituted. If substitution is required but the preceding text is to contain a '$' sign as
the very last character then $$$(FOO) would be specified. Thus if symbol FOO contains "BAR", then
$$(FOO) will remain "$$(FOO)" while $$$(FOO) will become "$BAR". Substitution is not recursive, only
one substitution pass is made.

4.7.5 Examples

Example 1:

The DEFSYM configuration statement

DEFSYM TAPEDIR "/home/hercules/tapes"

and the symbol substitution in the device definition

0380 3420 $(TAPEDIR)/scratch.aws

results in the following device definition used by Hercules

0380 3420 /home/hercules/tapes/scratch.aws

Example 2:

The DEFSYM configuration statement

DEFSYM DASDPATH "D:/HERCULES/DASD"

and the following symbol substitution in the device configuration

0148 3350 $(DASDPATH:=D:/MVS/DASD)/MVSRES.CKD

results in the following device definition with resolved DASDPATH symbol

0148 3350 D:/HERCULES/DASD/MVSRES.CKD

If however there is no symbol DASDPATH (the DEFSYM statement is missing) then the symbol in the
device definition is resolved with the defined default

0148 3350 D:/MVS/DASD/MVSRES.CKD

Example 3:

The device definition using the predefined symbol "CUUU"

0148.5 3350 D:/MVS/DASD/VOLSER.$(CUUU)

results in the following device definitions used by Hercules

0148 3350 D:/MVS/DASD/VOLSER.0148

0149 3350 D:/MVS/DASD/VOLSER.0149

014A 3350 D:/MVS/DASD/VOLSER.014A

014B 3350 D:/MVS/DASD/VOLSER.014B

014C 3350 D:/MVS/DASD/VOLSER.014C

Previous Page Next Page