Thanks a lot for your help and your tutorial it's a lot clearer for me!
But on the import data part of the tutorial it seems that you can import data from your C: drive(see attached). Is it because you are not working on a company server ?(*)
Besides, why when I am quoting something it automatically generates that root at the beginning of the quote: "/opt/sas/config/Lev1/SASApp/" and can I get rid of it ? You don'tseem to you have this problem and it may be for the same reason than the first question(*).
Jonathan
Your SAS session runs on a Linux server. UNIX systems use a single file navigation tree into which all storage is mounted. The character used to separate directories is the forward slash (and not the backward slash as in Windows). So the root of the whole filesystem is a single slash, and all your pathnames have to start with that, or the system will assume you use a relative path from the current working directory (which is /opt/sas/config/Lev1/SASApp, the place from where the server session was started).
After uploading the file in question to your server (you can use the Copy Files task for this), you need to use the target path in your code.
Hey!
I have a little question after using your tutorial.
Can I create as many Sas Tables as I have csv files(in one code) or it has to be concatenate in one Sas Table ?(just like your four Netflix files were concatenate in one Sas Table)
Thanks for your help.
Jonathan
You can create multiple datasets in one data step like this:
data
a
b
c
;
/* further code */
run;
As you see, all datasets need to be named explicitly in the DATA statement.
And you would have to code explicit OUTPUT statements for each of the datasets.
If you want to create X datasets of identical structures for X csv files, you should first evaluate if separate datasets are really needed. You may be better off creating a single dataset, and keeping the name (or part of the name) of the csv file in a separate variable.
If you really need separate datasets, first create a macro that reads a single csv file into a single dataset (both names being macro parameters), and then call this macro repeatedly from a list of the csv files.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.