How to get number of observation in SAS Dataset?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #49422
    rlochan2021
    Keymaster

    1.NOBS= option on a SET statement, you can find
    the number of observations in the data set:

    data _null_;
    put nobs=;
    stop;
    set xyz nobs=nobs

    2.
    proc sql noprint;
    select count(*)
    into :count
    from xyz

    3.

    data _NULL_;
    if 0 then set abc nobs=number;
    put “no. of observations =” number;
    stop;
    run;

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.