14.4.4 Examples
Example 1:
Retrieve the value of the Hercules symbol “version”.
say 'Hercules version = ' VALUE('version',,'SYSTEM')
Example 2:
Retrieve the value of the Hercules environment variable “HERCULES_RC”.
say 'Hercules RC = ' value('HERCULES_RC',,'ENVIRONMENT')
14.5 Error Handling
The error handling differentiates between the following types of errors:
An invalid command (‘command not found’) is treated as a ‘command error’. Command errors may be
handled with “SIGNAL ON ERROR”.
Failures in an otherwise valid command are treated as ‘command failures’. Command failures may be
handled with “SIGNAL ON FAILURE”.
Command return codes < 0 are interpreted as ERROR, return codes > 0 are interpreted as FAILURE.
Hercules will abort the startup process if the configuration file Rexx script returns with a non-zero return
code.