ISAM 7 statements (get next key and return it) now support dynamic variables. They do not, however, support auto-extension of arrays. So if you want to use an auto-extend array variable, you must first initialize each element; for example,
DIMX IKEY(1),S,0,AUTO_EXTEND
...
! load ISAM keys into an auto-extending array of dynamic elements
DO WHILE ERF(CH)=0
I = I + 1
IKEY(I) = "" ! must initialize element to get auto-extension!
ISAM #CH, 7, IKEY(I)
LOOP