A COBOL program complied with the option SSRANGE abends when an empty substring is used in a WHILE loop or when the index exceeds the string length. Compiling the same COBOL program with the option NOSSRANGE ensures that an empty substring or index exceeds string length in a WHILE loop is handled appropriately in respect that no runtime error occurs.
CA GEN should be enhanced to ensure an empty string or index exceeds string length in the SUBSTR function is handled appropriately in a While loop with the compiler option SSRANGE.
Appropriate handling means here: robustness => no runtime error (no abend) occurs and returning error-code which can be checked in case of errors.
This idea has been created on behalf of one of CA's CA Gen customers in Europe.