Note that the default value is a literal string and no substitution is applied to it. Thus attempting to use the
syntax "${foo=${bar}}" will not yield the expected results. It will not be substituted with the currently de-
fined value of the "bar" environment variable, but rather by the literal string "${bar" followed immediately
by the literal character '}'.

Symbols created with DEFSYM or environment variables can also be used as part of panel commands.
For example the command "cd $(TAPEDIR)" will change the current directory to the resolved string for
the symbol TAPEDIR.

It is important to note that symbol names, potentially being the names of environment variables, are sub-
ject to whatever case sensitivity the host operating system happens to enforce or allow. Under Windows
environment variables are not case sensitive, whereas on other operating systems they may be. Thus
"$(FOO)", "$(foo)" or "$(Foo)" all cause the same value to be substituted on Windows, whereas they
could be substituted with completely different values under a case sensitive operating system.

4.7.1 Syntax

Descriptive

$(symbol[[:]=default])

or

${symbol[[:]=default]}

Diagram

Êʬ¬¬ $ ¬¬¬§¬¬¬ ( ¬¬¬§¬¬¬ symbol ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬§¬¬¬ ) ¬¬¬§¬¬¬¬¬¬ÊÍ



default






default

4.7.2 Parameter

symbol

This is the name of the symbol.

default

This is the default value that takes place if the symbol is not defined.

4.7.3 Special symbols

4.7.3.1 Predefined symbols

The symbols according to the following table are predefined and can be used without defining the symbol
through a corresponding DEFSYM configuration statement or panel command.

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.

Previous Page Next Page