Hi there - I'm a beginner with SAS (on a Mac) and am trying to use proc logistic - but I keep getting error responses. My code is as below:
75 if qx17 ^=‘ ‘ then do; ___ 388 76 ERROR 388-185: Expecting an arithmetic operator.
You are using "curly" quotes, these do not work inside of SAS. You need to use the straight quotes, which would look like this:
if qx17 ^=' ' then do;
Curly quotes often happen if your code is pasted into SAS from a word-processor or PowerPoint. Don't do this.
Futhermore, please help us out in the future by pasting the log file into the window that appears when you click on the {i} icon. This preserves the formatting of the log and makes it easier for us to read and decipher. DO NOT SKIP THIS STEP!
75 if qx17 ^=‘ ‘ then do; ___ 388 76 ERROR 388-185: Expecting an arithmetic operator.
You are using "curly" quotes, these do not work inside of SAS. You need to use the straight quotes, which would look like this:
if qx17 ^=' ' then do;
Curly quotes often happen if your code is pasted into SAS from a word-processor or PowerPoint. Don't do this.
Futhermore, please help us out in the future by pasting the log file into the window that appears when you click on the {i} icon. This preserves the formatting of the log and makes it easier for us to read and decipher. DO NOT SKIP THIS STEP!
Thanks! That's funny - I was actually advised to use the curly quotes and had switched from straight ones. Thank you 🙂
@rebecca8 wrote:
Thanks! That's funny - I was actually advised to use the curly quotes and had switched from straight ones. Thank you 🙂
You may want to go back to the source that recommended the curly quotes and see if they actually meant to use that for CODE statements or output appearance in a report.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.