I am unable to understand why I am getting a 'subscript out of range' error with the following:
A 'next-record' table with 99 entries subscripted by 'bom-level':
05 next-record occurs 99 pic S9(9) comp.
05 bom-level pic 9(2) comp.
I have put in debugging code and the subscript (bom-level) never breaks the 99 entry limit - in fact it never gets higher than 3 (see 'Lvl' below):
---
Enter assembly to explode...
A
<enter> to continue ...
Lvl Ass Comp
1 A B
1 A C
2 C D
3 D F
3 D G
2 C E
3 E H
3 E I
Object Code error : file 'partexp3'
error code: 153, pc=3C5, call=1, seg=0
153 Subscript out of range
---
My code otherwise does what it is supposed to do - it completes but I then get the error message. Can anyone throw any light on this please?
Thanks
'Subscript out of range' puzzle
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.



