WHEN SYSTEM = 'ESA/390' THEN DO
ADDRESS HERCULES 'ARCHLVL ESA/390'
ADDRESS HERCULES 'MAINSIZE 2048'
ADDRESS HERCULES 'ENGINES 2*CP'
ADDRESS HERCULES 'XPNDSIZE 2048'
END
WHEN SYSTEM = 'z/ARCH' THEN DO
ADDRESS HERCULES 'ARCHLVL z/ARCH'
ADDRESS HERCULES 'MAINSIZE 4096'
ADDRESS HERCULES 'ENGINES 4*CP,2*AP'
ADDRESS HERCULES 'XPNDSIZE 0'
END
OTHERWISE DO
SAY 'Invalid architecture mode specified'
RETURN 16
END
The above extract from a configuration file shows the different settings of system parameters depending
on the value of a variable.
14.3 Command Environment
Hercules commands can be issued from Rexx through the Hercules command environment. The Her-
cules command environment is the default environment, therefore it is not necessary to specify it, when
using Hercules commands within a Rexx script.
Example 1:
Executing the Hercules ‘ARCHLVL’ command from a Rexx script specifying the Hercules command en-
vironment.
ADDRESS HERCULES 'ARCHLVL S/370'
Example 2:
Executing the Hercules ‘ARCHLVL’ command from a Rexx script without specifying the Hercules
command environment.
'ARCHLVL S/370'
14.4 The Rexx Builtin Function “value()”
Hercules symbols and environment variables can be retrieved with “value()” or “getenv()”. The builtin
function “getenv()” is obsolete and has been replaced by “value()” and should no longer be used.