× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



RPower@xxxxxxxxxx wrote:
I have a two dim array and trying to use Xfoot on a numeric field, but I can't seem to get the syntax right. Here's what I've got:

d Sf5rec ds d Dsc 30 d Cde 10 d Sub 5 d Amt 9 2
d Ccm 1 d Csh 9 2
d Chq 9 2
d Dbt 9 2
d Crc 9 2
d Cnt 3 0


d Cols ds qualified d dim(50) d Record LikeDs(Sf5Rec) dim(50)

c Eval Pay_Cnt = Pay_Cnt + c %Xfoot(Cols(x).Record.Cnt)

I get a compile error on the %Xfoot. Any ideas? Should I be using an index on the Record portion as well?
...

First, "Cols(x).Record.Cnt" is not a valid qualified name expression since you didn't specify an array index on "Record". Second, the expression does not reference an array - "Cnt" is a scalar variable.


What should you do? Code something like:

    sum = 0;
    for i = 1 to 50;
        sum += Cols(x).Record(i).Cnt;
    endfor;
    Pay_Cnt += sum;

That is, you can't use %XFOOT for this situation.

Cheers! Hans


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.