From: mahi on
HOW TO COUNT NUMBER OF VARIABLES IN A DATASET?
From: Oleg on
On Jul 27, 6:48 am, mahi <mehetrey.mahen...(a)gmail.com> wrote:
> HOW TO COUNT NUMBER OF VARIABLES IN A DATASET?

Hi.
Try this code.

%let dsid=%sysfunc(open(sashelp.shoes));
%let nvars=%sysfunc(attrn(&dsid,nvars));
%let rc=%sysfunc(close(&dsid));

%put &nvars;

Oleg.