Today I read the `Who knew you could do that` manual. I came across the %XFoot BIF that calculates the sum of an (numeric) array. So I thought there must be a way to sum up the subfields of a datastructure array that holds (e.g.) invoices and their value.

To get the invoice Data I run embedded SQL that stores the data from the database in a qualified datastructure which is defined as dim(1000). 

I tried to `%XFoot(invoiceDS:1:1000)` and `%XFoot(invoiceDS(*).value:1:1000)`. None of them compiled since the qualified expression is not allowd as parameter for %XFoot. 

Then I tried to get a sub-Portion if the datastructure array with `%SubArr(invoiceDS(*).value:1:1000)`. But this also failed since 'value' is no fieldgroup.

Is there any solution for this?