Help using Base SAS procedures

what could be the syntax error in this SAS code?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

what could be the syntax error in this SAS code?

Hi I have been trying to find why the follwoing SAS code showed a syntax error statement and the program did not process the procedure.

 

proc surveyfreq data=file name you have;

   tables  (first domain variable * second domain variable) * (categorical variables)/chisq CL list missing;

   strata  strat variable;

   cluster psu variab;e;

   weight  weighting variable;

   TITLE ‘descriptive characteristics of two sub-samples (the two domain variables)

   run;

 

Any thoughts please?

 

Thank you,

 


Accepted Solutions
Solution
‎07-07-2017 05:19 PM
PROC Star
Posts: 7,489

Re: what could be the syntax error in this SAS code?

Posted in reply to Maha-Albqoor

Hard to say without seeing the actual code you ran and not seeing it in a box that you insert by clicking on the {i} icon.

 

From the code that you showed us the first thing that stands out are the odd single quotes around the title. Change them to regular quotes, make sure you insert a semi-colon at the end of the statement, and it might run as expected.

 

I presume that where you showedfirst domain variable, second etc., strat variable, psu variable and weighting variable, you actually had real variable names. If not, that would also be why it wouldn't run (besides the fact that psu variab;e; would DEFINITELY cause an error.

 

Art, CEO, AnalystFinder.com

View solution in original post


All Replies
Solution
‎07-07-2017 05:19 PM
PROC Star
Posts: 7,489

Re: what could be the syntax error in this SAS code?

Posted in reply to Maha-Albqoor

Hard to say without seeing the actual code you ran and not seeing it in a box that you insert by clicking on the {i} icon.

 

From the code that you showed us the first thing that stands out are the odd single quotes around the title. Change them to regular quotes, make sure you insert a semi-colon at the end of the statement, and it might run as expected.

 

I presume that where you showedfirst domain variable, second etc., strat variable, psu variable and weighting variable, you actually had real variable names. If not, that would also be why it wouldn't run (besides the fact that psu variab;e; would DEFINITELY cause an error.

 

Art, CEO, AnalystFinder.com

Occasional Contributor
Posts: 16

Re: what could be the syntax error in this SAS code?

Thank you so much. Unfortuantely I still cannot access the dataset or get the SASlog, I sent this code to analysts who have the access and they just told me they got errors!

yes there are actual names of the variables

 

Thank you for the quick help.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 155 views
  • 0 likes
  • 2 in conversation