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.
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.