Using JCLCheck with the REXX interface fails when JCLCheck runs in batch mode.
999 +++ msgval = MSG('OFF')
IRX0043I Error running rexxpgm, line 999: Routine not found
Release : 12.0
Component : JCLCheck Workload Automation
The MSG('OFF') function is available in TSO, and not in a batch.
[ Using MSG, you can control the display of TSO/E messages from TSO/E commands and TSO/E external functions. Use the following options (ON/OFF) to control the display of TSO/E informational messages. Informational messages are automatically displayed unless an exec uses MSG(OFF) to inhibit their display.]
The JCLCheck REXX interface runs under TSO when it is called in TSO using the EDCHEK (EJCK, JCK), or using the ISPF panel interface Foreground option.
Use the TSO/E REXX ADDRESS function to test whether the REXX exec runs in TSO or in a batch environment. Example:
tenv=ADDRESS()
IF tenv = 'MVS' then say 'running in batch '
IF tenv = 'TSO' then say 'running under TSO'
Note: You cannot set an environment that is not available. In other words, the environment cannot be set to TSO when you're running in batch.