Use SSRANGE to generate code that checks whether subscripts (including ALL subscripts) or indexes try to reference an area outside the region of the table. Each subscript or index is not individually checked for validity; rather, the effective address is checked to ensure that it does not cause a reference outside the region of the table.
Variable-length items are also checked to ensure that the reference is within their maximum defined length.
SSRANGE option syntax .-NOSSRANGE-. >>-+-----------+----------------------------------------------->< '-SSRANGE---'
Default is: NOSSRANGE
Abbreviations are: SSR|NOSSR
Reference modification expressions are checked to ensure that:
If SSRANGE is in effect at compile time, range-checking code is generated. You can inhibit range checking by specifying the CHECK(OFF) runtime option. Doing so leaves range-checking code dormant in the object code. Optionally, the range-checking code can be used to aid in resolving unexpected errors without recompilation.
If an out-of-range condition is detected, an error message is generated and the program is terminated.
Remember: Range checking is done only if you compile a program with the SSRANGE option and run it with the CHECK(ON) option.
related concepts
Reference modifiers
related tasks
Checking for valid ranges