CARDINALITY Procedure

VAR Statement

  • VAR variables </ options>;

The VAR statement enables you to specify a subset of variables in the input data table (which is specified in the DATA= option in the PROC CARDINALITY statement) and specify how to order them.

You can specify one or more VAR statements for each type of ordering that you want. You cannot specify a variable more than once in all the VAR statements.

ORDER=ASC |DESC |ASCFMT |DESFMT

requests a specific method of levelization. You can specify the following values:

ASC

orders the specified variables in unformatted ascending order.

DESC

orders the specified variables in unformatted descending order.

ASCFMT

orders the specified variables in formatted ascending order.

DESFMT

orders the specified variables in formatted descending order.

By default, the value of the ORDER= option in the PROC CARDINALITY statement is used. If the ORDER= option is not specified in the PROC CARDINALITY statement, ORDER=ASC by default if the variable is unformatted or ORDER=ASCFMT by default if the variable is formatted.

Last updated: May 14, 2026