In practice I find a combination of *BASED and *DEFINED is the
right answer. For an API that returns a list and each element in the
list is a number of fields I use *DEFINED to build the 'record layout'
and then use *BASED to roll through the list. Maybe this is what you
meant, but here is parts of an example from a program I wrote recently: