I have used the Describe method. This method is a way to get into the Powerbuilder run time attributes and methods. Here is the code I used to get all the data from a pbdatawindow.
Set dataWindowTO = ... pbdatawindow(''myDataWindow'')
Data = dataWindowTO.Describe(''datawindow.data'')
Reporter.ReportEvent micPass, ''DataWindow data'', Data
Recommend reading the ''HP QuickTest Object Model Reference'' for more information on this method
For reference data check out:
[Sybase DataWindow® Programmer's Guide][1]
[Sybase DataWindow Reference][2]
[1]: http://download.sybase.com/pdfdocs/pbg0900e/dwprgug.pdf
[2]: http://download.sybase.com/pdfdocs/pjg0400e/dwref.pdf