View previous topic :: View next topic
|
Author |
Message |
harikrishnanrajeev
EXPERT
Joined: 28 Jan 2004 Posts: 37 Location: Trivandrum
|
|
|
|
Hello ,
Can any body pls explain to me what SSRANGE and NOSSRANGE is.
Thanks and regards
Hari. |
|
Back to top |
|
|
vamseepotti
New User
Joined: 21 Oct 2003 Posts: 45
|
|
|
|
Hi Hari,
SSRANGE NOSSRANGE both r compiler options..
By default NOSSRANGE.
If we give compiler option SSRANGE*** its arrary bound checking
Vamsee. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Hari,
A few additional comments.
With the default (NOSSRANGE) active, a receiving field using an "out of range" subscript will be overlaid with invalid data (or more precicely, data not intended for that data area). The pgm will continue to execute until it abends because of the subscripting error or abends for another reason or it completes normally.
If you're LUCKY it will abend because of the subscripting error. If it doesn't you may never know, but your user(s) will be acting on erroneous data. Not good!
This is where SSRANGE is helpful. It will abend your pgm whenever the subscript is outside the range of the table it is referencing. E.g. if you have a 10 entry table and the ss is minus, zero or > 10.
Just remember that it has a performance impact and the option s/b changed before the pgm goes into production. Maybe even volume test.
HTH, Jack. |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
In other words if you do not have 'SSRANGE' as compiler option, even if you access 11th occurence of an array of size 10. it would still not object but you can not predict the results as mmwife mentioned |
|
Back to top |
|
|
|