Try this. Its a little bit strange but it works.
D pbtw s based(pbtwpntr) dim(10)
D pbtwpntr s * inz(%addr(ipbtw00))
The field pbtw is your array (10 elements), based on a pointerfield.
The field pbtwpntr is a pointer to the FIRST field of a range of 10 fields
(ipbtw00, ipbtw01......ipbtw09).
Assumming none of the 10 variables are already defined in a data
structure....
D MyDs DS
D Var01 7P 6
D Var02 7P 6
D Var03 7P 6
D Var04 7P 6
D Var05 7P 6
D Var06 7P 6
D Var07 7P 6
D Var08 7P 6
D Var09 7P 6
D Var10 7P 6
D MyArr 7P 6 Overlay(Var01)
D Dim( 10 )
Mike Cravitz
NEWS/400 Technical Editor