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:
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.