Ed:

I would do it something like the following.  When it is found to work
ok, I would get rid of the given explanatory diagnostics.

--Bill
      
________________________________________________________________________
____________
                                                                 
  open 'FILE' to F.File  else  null

  read R.File from F.File, File.ID  else  R.File = ''
    This.Item = R.File<11>
 
VM = char(253)                          
                          Total.Nbr.Items = dcount(This.Item, VM)
    for This.Count = 1 to Total.Nbr.Items

      This.Element = R.File<11, This.Count>

      begin case
            case This.Element > 0  ;  Total.Nbr.NonZero.Elements += 1
      end   case

    next.This.Count

  crt 
  crt 'This.Item                  ' : This.Item
  crt 'Total.Nbr.Elements         ' : Total.Nbr.Elements 
  crt 'Total.Nbr.NonZero.Elements ' : Total.Nbr.NonZero.Elements
  crt
  crt ' [<] ' :

  input Ans, 1

*-----------------------------------------------------------------------
-------
The.End:

  crt @(-1)

  END




-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ed Hess
Sent: Wednesday, January 06, 2010 5:46 PM
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
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to