RPG (IBM i / AS/400) · File status code
What does Status Code 00121 mean in RPG (IBM i / AS/400)?
The program referenced an array element with a subscript less than 1 or greater than the array's declared number of elements.
The program referenced an array element with a subscript less than 1 or greater than the array's declared number of elements.
Bound the index against %ELEM() before referencing the array, particularly when the index comes from a loop counter, database value, or other external input.