Hi Ed,

I would just extract one element at a time and check if the value is > 0

COUNTER = 0
THE.FIELD = THE.RECORD<11>
LOOP
REMOVE THE.VALUE FROM THE.FIELD SETTING MORE.DATA
IF VALUE > 0 THEN COUNTER += 1
WHILE MORE DO
REPEAT

You can also accumulate the total by each field, by checking on the status
of MORE.DATA
   

Regards
 
Bernard Lubin




-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ed Hess
Sent: Thursday, 7 January 2010 9:46 AM
To: [email protected]
Subject: [U2] Count question

Hi all,

Using UniVerse 9.6 on AIX4.1,

I'm trying to write a routine to count the number of occurrences of
values > than 0, for example,

against this attribute:

 

0011: 4|0|0|0}4|23|4|0 

 

I'd like to return a value of '4' for the 4 values > 0.

Not having much luck with COUNT or DCOUNT.

 

Any help is greatly appreciated.

 

Ed Hess

 

 

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
-- 
Message  protected by DealerGuard: e-mail anti-virus, anti-spam and content
filtering.
http://www.pentanasolutions.com

Click here to report this message as spam:
https://login.mailguard.com.au/report/1z29slBPpD/16kC0lWcwU0NvlVCGe3657/0


_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to