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.
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.