Posted On: Feb 22, 2018
In COBOL, SSRANGE and NOSSRANGE are two compiler options that affect the way the program handles subscript out-of-range errors.
SSRANGE stands for "subscript range checking." When SSRANGE is specified, the compiler generates code that performs range checking on all array subscripts at run time. If an out-of-range subscript is detected, the program will terminate with a run-time error.
NOSSRANGE stands for "no subscript range checking." When NOSSRANGE is specified, the compiler does not generate code to perform range checking on array subscripts at run time. This can result in faster program execution, but it also means that if an out-of-range subscript is used, the program may continue to run with unpredictable results. It is generally recommended to use SSRANGE during program development and testing to catch and fix any subscript out-of-range errors, and then switch to NOSSRANGE for production code to improve performance.
However, the decision to use SSRANGE or NOSSRANGE ultimately depends on the specific requirements of the program and the trade-offs between performance and error checking.
Never Miss an Articles from us.
COBOL is a dominant programing language that has aided business users since few decades. Following are the features of..