I inherited a snippet of code written in BASE (see below). It works fine. I need to run the code in STUDIO. Of course I'm brand new to the company and to STUDIO.
Here is the code:
PROC IMPORT OUT= WORK.Members
DATAFILE= "\\maskedforsecurity.txt"
DBMS=TAB REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
DATA MEMBERS;
SET MEMBERS;
IDMEDICALC = PUT(MEMBERID, 12.);
RUN;
Here is what happened in Studio:
1. I could not get the "proc import out =" statement to work, so I imported manually.
2. The second statement creates a two variable file with no data (Originally, there were 300 some cases and 5 variables)
My questions:
a. what am I doing wrong?
b. where is a good resource that outlines differences in code behavior between Base and Studio?
I can't address the IMPORT problem, but I wouldn't be surprised of SAS Studio can't run PROC IMPORT.
For your second issue, it's likely you forgot the semicolon at the end of the DATA statement.
In my experience SAS code works identically between Base / EG / SAS Studio assuming that they are all using the same SAS servers with the same set up.
Thank you.
Understood.
Being new to SASS, these boards, and my job, I debated including the log.
I would need to edit information out because I work for a state govt entity in health care and security policies are excruciatingly strict.
What's the minimum log information required?
s
How about doing a "find/replace" of all the privacy-related filenames and varnames? Just use consistent, but unique replacement characters consistently throughout the log.
But more generally one is interested in the sas notes, warnings, and error messages - and (more problematic for your secutiy issues) the lines of code that precipitated those messages.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.