Help using Base SAS procedures

Proc Freq nlevels

Reply
Frequent Contributor
Posts: 99

Proc Freq nlevels

Hi,
I am trying to get the level counts for the variable market in code listed below. But SAS gives me error. My sas version is SAS 9.1 TS Level1M3.

Thanks in advance,

Amit

code:

rsubmit;
libname try ' library location ' ;
proc freq data=try.temp nlevels;
tables market;
run;
endrsubmit;


error:

ERROR 22-322: Syntax error, expecting one of the following: ;, (, COMPRESS,
DATA, FC, FORMCHAR, NOPRINT, ORDER, PAGE.
ERROR 200-322: The symbol is not recognized and will be ignored.
N/A
Posts: 0

Re: Proc Freq nlevels

please post the log, from the line that says libname down to the error
Frequent Contributor
Posts: 99

Re: Proc Freq nlevels

Posted in reply to deleted_user
Here is the log from actual program



5 rsubmit;
NOTE: Remote submit to UNIXBOX commencing.
152 libname merbonus '/intl/iimis1/intl_mr/abothra/merchant/bonus';
NOTE: Libref MERBONUS was successfully assigned as follows:
Engine: V8
Physical Name: /intl/iimis1/intl_mr/abothra/merchant/bonus
153
154 proc freq data=merbonus.exceldata nlevels ;
------- -
22 200
ERROR 22-322: Syntax error, expecting one of the following: ;, (, COMPRESS,
DATA, FC, FORMCHAR, NOPRINT, ORDER, PAGE.
ERROR 200-322: The symbol is not recognized and will be ignored.
155 tables market /noprint ;
156 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FREQ used:
real time 0.00 seconds
cpu time 0.00 seconds

NOTE: Remote submit to UNIXBOX complete.
Frequent Contributor
Posts: 139

Re: Proc Freq nlevels

I think your noprint is in the wrong place

try
proc freq data=merbonus.exceldata nlevels noprint;
tables market ;
run;

vs.


proc freq data=merbonus.exceldata nlevels ;
tables market /noprint;
run;
SAS Super FREQ
Posts: 8,869

Re: Proc Freq nlevels

Hi:

I notice that the libref MERBONUS was created with the V8 engine. Is it possible that you are still running SAS 8?

I know that NLEVELS works with SAS 9. I can't remember whether it was an available option in SAS 8 or not. Tech Support could answer that question for sure. I no longer have SAS 8 to test with.

cynthia
Ask a Question
Discussion stats
  • 4 replies
  • 431 views
  • 0 likes
  • 4 in conversation