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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.