How to use the option MAXCLAUSES in a REXX program to avoid the error OPS1097J?
search cancel

How to use the option MAXCLAUSES in a REXX program to avoid the error OPS1097J?

book

Article ID: 279708

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

Getting the error OPS1097J when running a long REXX program:

OPS1097J ERROR 97 RUNNING xxxxx, LINE 3: OVER nnnn CLAUSES EXECUTED

I know I can set the parameter REXXMAXCLAUSES but I want to override its value just for a particular REXX program.

Resolution

See the example below of how to set the option MAXCLAUSES for a particular REXX program and how to test it.

The example below can be used to prevent a REXX program to execute more than 20 clauses:

options "maxclauses=20"
do i = 1 to 21         
 say ' i ' i           
end