1.

Consider a scenario where we have a program having an array of 20 items. When the program tries to access the 21st item, the program fails to abend. What is the reason for this?

Answer»

The DEFAULT compiler option NOSSRANGE MUST have been USED which does not allow the program to abend. If we want the program to abend WHENEVER accessing an array element that is out of bounds, we need to use the compiler option of SSRANGE. Using this option, the program abends with SOC4 error which indicates that it tried to access an invalid address by using the WRONG index.



Discussion

No Comment Found