@lmyers2 wrote:
However, when I go to make a new variable from this variable in a data step, I keep getting errors regardless of whether I put quotes around it or not. Any ideas?
Your variable name is without quotes but the value must be in quotes and match exactly.
Post your code and error so we can help you figure out what to change.
if varName in ('99.2 Intubation', '99.3 Bronchoscopy') then category = 1;
else category = 2;
@lmyers2 wrote:
Hello,
I'm using SAS 9.4. I have a variable that contains both numbers and letters (example below). When I run proc contents, SAS is recognizing it as a character variable. However, when I go to make a new variable from this variable in a data step, I keep getting errors regardless of whether I put quotes around it or not. Any ideas?
99.2 Intubation
99.3 Bronchoscopy
99.4 Thoracentesis
Thanks!