IRX0043I Error running rexxpgm, line xxxx: Routine not found. Routine is msgval = MSG('OFF').
search cancel

IRX0043I Error running rexxpgm, line xxxx: Routine not found. Routine is msgval = MSG('OFF').

book

Article ID: 238506

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

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

Environment

Release : 12.0

Component : JCLCheck Workload Automation

Cause

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.]

 

Resolution

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.