Previous Topic: Usage Notes for OPTIONS InstructionsNext Topic: RETURN Instruction


Sample Uses of OPTIONS Instructions

The following examples demonstrate the use of the OPTIONS instruction.

  1. This overrides the default maximum string length for REXX programs:
    LENGTH = 30000
    OPTIONS "MAXSTRING="LENGTH
    
  2. These illustrate how to limit or not limit the number of times an individual rule executes per minute:

    Note: If an OPTIONS statement specifying the execution limit for a rule appears in the processing section of that rule, that limit does not take effect the first time CA OPS/MVS encounters the statement. However, the limit applies to all subsequent executions of the rule.

  3. The following example, when inserted at the beginning of a REXX program executed through the OI or OX command, enables you to skip monitoring all execution limits in the program:
    OPTIONS "NOMAXCLAUSES NOMAXTIME NOMAXSAYS NOMAXCMDS"
    
  4. These illustrate valid OPTIONS instructions that use the OPSWXTRN keyword:
    OPTIONS 'NoMaxClauses OPSWXTRN=NOTFOUND MaxSays=200'
    OPTIONS "OPSWXTRN=NOTFOUND"
    OPTIONS 'OPSWXTRN=NOTF'
    OPTIONS 'OPSWXTRN=EXTSUB1 OPSWXTRN=EXTSUB2'
    
  5. This example of the OPSWXTRN keyword used in an OPTIONS instruction illustrates a case in which CA OPS/MVS will not flag the instruction as an error but will ignore it because it is on a continuation line rather than on the OPTIONS source line:
    OPTIONS 'NoMaxClauses MaxSays=512' || ,
            " OPSWXTRN=NOTFOU99"
    
  6. These examples illustrate invalid OPTIONS instructions that use the OPSWXTRN keyword: