{Urgent} I am fairly new to SAS and have two questions.
First, I am trying to run this code. Would I need to run the data temp;set EHdata.ARCHdata; line with the other code I've written everytime> Because, when I do not, I get this error message:
Second, I am trying to create this new variable ANCComplication using categorical variables that already exist in my dataset. Here is the code I've written:
However, when I run a proc freq of ANCComplication, I get this:
Let me know what I am doing wrong for both of these problems! Thank you!
Hi and welcome to the SAS Communities 🙂
Can you please post your code using the little running man instead of posting it as images? Makes it much easier to provide a usable answer.
For your first question: "if" is a data step statement and works only inside a data step; the "run;" right before your if's constitutes a "step boundary", meaning the previous step is finished and you need to start a new one. Or if you did not want the previous step to finish yet, remove that run.
I recommend that you work through the free online Programming 1 course, where such issues are covered.
Please post code using the "little running man" icon.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.