MXLOOPS Subcommand (SET command)
MXLOOPS specifies
the maximum number of times that a loop that is defined by the LOOP-END LOOP structure is executed for
a single case or input record. The default is 40.
-
MXLOOPSprevents infinite loops, which may occur if no cutoff is specified for the loop structure (seeLOOP-END LOOP). -
MXLOOPSwill limit the number of loops for any loop structure that doesn't have an indexing clause, including loops with conditionalIFclauses. If a loop has an indexing clause (e.g.,LOOP #i=1 to 1000), the indexing clause overrides theMXLOOPSsetting. - When a loop is terminated, control passes to the
command immediately following the
END LOOPcommand, even if theEND LOOPcondition is not yet met.