What is a SSRANGE and NOSSRANGE in Cobol?

devquora
devquora

Posted On: Feb 22, 2018

 

    1 Answer Written

  •  devquora
    Answered by devquora

    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.

Related Questions

Please Login or Register to leave a response.

Related Questions

Cobol Interview Questions

What is COBOL?

In 1959, the US Department of Defence formed CODASYL (Conference on Data Systems Language). CODASYL was formed with the..

Cobol Interview Questions

Write some characteristics of COBOL as means of business language.

COBOL is a dominant programing language that has aided business users since few decades. Following are the features of..

Cobol Interview Questions

What are different data types in COBOL?

COBOL supports three data types in it programming structure. They are- Alpha-numeric (X) Alphabetic (A,B,C) Numeric (1,..