cnt( )

Syntax

... cnt(field) ....

Effect

Data objects with the names cnt(field1) cnt(field2) ... of the data type i are automatically created for the fields field1 field2 ... of the field groups of an extract dataset. These fields can only be addressed within the LOOP and, for sorted extract datasets, are filled with values using the statements AT END OF and AT LAST.

If field1 field2 ... are fields with a non-numeric data type of the field group header and the extract dataset was sorted by field1 field2 ..., cnt(field1) cnt(field2) ... contain the number of different values that field1 field2 ... have within the control level of the entire dataset.

If the fields cnt(field1) cnt(field2) ... are accessed without previous sorting of the extract dataset, this can lead to an untreatable exception.