In reply to Paul Homes.

Yes, that seems nice but it really is a kludge. With a background in C I know I would trip over this as element 0 of an array is the first element. I actually found a bug in SAS a while ago where starting at zero failed in ODS MATCH_ALL. Please keep the array pure.

A far better improvement would be to give the macro language a genuine array type. Then you would have a function or property to return the number of elements. A great deal of messing about with the macro language is just to work around this lack. Why not make the macro facilities match the table-oriented paradigm of the dataset?