I am using University Edition, and tried to limit observations in line 78.
I just want to have the output which only contains the "self" in variable V103.
and also want to drop rows, do I have to write down each row name, or is there any convenience way.
here is my log file.
Without quotes, SAS assumes that self is the name of a variable. Character literals must be enclosed in single or double quotes.
i was tried to add the quotes, but there is another error that is:
@xiaolufan wrote:
i was tried to add the quotes, but there is another error that is:
ERROR: Variable V103 has been defined as both character and numeric.
Look at your data. If V103 is numeric, it makes no sense comparing it to the string "self".
Use proc contents on the input dataset(s).
You can just replace line 78 with this:
if V103='Self';
Try using the put() function to transform V103 into a string variable. I find a solution to that error in the following URL:
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.