RUNARRAY subcommand — process an array of control blocks

Use the RUNARRAY subcommand to process an array of control blocks. You can specify the order that subscripts should be processed.

RUNARRAY optionally displays each control block.

You can specify additional subcommand, CLIST, or REXX exec processing with the EXEC parameter. For each entry in the array, RUNARRAY will display the storage, set the value of X to describe the entry, and then process the EXEC parameter for that entry.
  • Related subcommands
    • RUNCHAIN
    • RUNCPOOL
  • Syntax
    RUNARRAY                 
    
                  [ data-descr | ADDRESS(X) ]                 
                  [ ASCENDING | DESCENDING ]                 
                  [ EXEC((clist|rexx-exec|subcommand)) ]                 
                  [ SUMMARY | NOSUMMARY ]

    -------- SETDEF-Defined Parameters -------------------------
    Note: You can override the following SETDEF parameters.

                  [ DISPLAY[(display-options)]   ]
                  [ NODISPLAY[(display-options)] ]
                  [ FLAG(severity) ]
                  [ PRINT | NOPRINT ]
                  [ TERMINAL | NOTERMINAL ]  
                  [ TEST | NOTEST ]
                  [ VERIFY | NOVERIFY ]
  • Parameters
    data-descr
    ADDRESS(X)
    Specifies the data description parameter, which consists of five parts:
    • An address (required when data-descr is explicitly specified on the subcommand)
    • Address processing parameters (optional)
    • An attribute parameter (optional)
    • Array parameters (optional)
    • A remark parameter (optional)
    Data description parameter explains the use and syntax of the data description parameter. However, the following applies to RUNARRAY only:
    • The address is not a positional parameter. You must use the ADDRESS parameter to specify an address.
    • If you omit the ADDRESS parameter, the default for the RUNARRAY subcommand is ADDRESS(X), the most recently accessed address.
    • If you describe a block that is not an array, RUNARRAY treats it as an array containing one entry, ENTRY(1).
    ASCENDING
    DESCENDING
    Specifies the order in which subscripts are to be processed.
    EXEC((clist))
    EXEC((rexx-exec))
    EXEC((subcommand))
    Specifies that a CLIST, a REXX exec, or an IPCS subcommand is to be appended to the RUNARRAY subcommand invocation. The appended CLIST, REXX exec, or subcommand runs for each control block in the chain. Parameters or keywords can accompany the CLIST, REXX exec, or IPCS subcommand. The symbol X will point to the current array entry before each EXEC invocation.

    The RUNARRAY subcommand generates a return code that consists of its own return code plus the return code from the CLIST, REXX exec, or IPCS subcommand designated on the EXEC parameter. If the CLIST, REXX exec, or IPCS subcommand returns with a serious condition, RUNARRAY processing ends with the current array entry.

    SUMMARY
    NOSUMMARY
    Controls the formatting of a processing summary after normal completion of RUNARRAY processing. A processing summary is always produced if abnormal conditions force termination of RUNARRAY.
  • Return codes

    See Standard subcommand return codes for a description of the return codes produced by the RUNARRAY subcommand.

    The RUNARRAY subcommand generates a return code that consists of its own return code plus the return code from a CLIST, REXX exec, or IPCS subcommand if designated by the EXEC parameter. If the CLIST, REXX exec, or IPCS subcommand returns with a serious condition, RUNARRAY processing ends with the current control block.