BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
jon8
Obsidian | Level 7

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(*).

 

JonathanCapture d’écran 2022-07-18 à 11.52.20.png

 

Kurt_Bremser
Super User

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.

jon8
Obsidian | Level 7

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

Kurt_Bremser
Super User

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: Call for Content

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!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 18 replies
  • 3274 views
  • 4 likes
  • 4 in conversation