Hi,
I'm using SAS studio.
Using the original dataset, I've created a new dataset with no missing variables. Instead of running the code each time to create that new dataset, is there a way I can save the new dataset onto the server? So the new dataset would be my new default.
Any help would be appreciated.
Thanks!
What I do, import my raw data, call it raw.
Then do a bunch of cleaning step. Save it to the server with a new name, ie 'proj4.data4analysis' I'm not that creative.
Then all the following steps are built off the data4analysis dataset.
I do not replace the raw import data but do not save intermediary steps between the raw and data4analysis typically either. That could be reproduced by running the program if someone wants.
Thanks so much! What code do you use to save it as a new file?
library proj4 '/home/fkhurshed/Demo1/Project4/data';
*import file;
proc import out=raw..... run;
data clean1;
set raw;
...
run;
data clean4;
set clean3;
....
run;
data proj4.data4analysis;
set clean4;
run;
See the last step.
You create the library where you want to save the project work first.
That's usually how my process would work to some degree. To be honest, I'd actually usually separate out the import step as well into a separate program but that's when you get to really streamlining a process. I set it up as minimum 4 programs:
Reason being, that sometimes data sources change over time. For example when I start a proof of concept it may be CSV files I work with and then when moving later on, it becomes a DB table that I'm working with instead so then I can just change it easily in a single program.
Thank you for sharing your code.
I see what you did there. Is there way to save the dataset proj4.data4analysis without actually running proc import of the old data again and datasets clean 1 to 4?
Got it! Thank you for your help!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.