DATA Step, Macro, Functions and more

Gather all csv files from a folder into a single sas table.

Accepted Solution Solved
Reply
Contributor
Posts: 33
Accepted Solution

Gather all csv files from a folder into a single sas table.

 

Hello,
i would like to import all these csv files from this folder into sas quickly.
Then concatenate all in one table.

Thanks for your help.

Capture d’écran (110).png

 


Accepted Solutions
Solution
‎11-27-2017 06:15 PM
PROC Star
Posts: 1,400

Re: Gather all csv files from a folder into a single sas table.

Use this example from SAS Support

 

http://support.sas.com/kb/41/880.html

 

and stack them accordingly Smiley Happy

View solution in original post


All Replies
Solution
‎11-27-2017 06:15 PM
PROC Star
Posts: 1,400

Re: Gather all csv files from a folder into a single sas table.

Use this example from SAS Support

 

http://support.sas.com/kb/41/880.html

 

and stack them accordingly Smiley Happy

Super User
Super User
Posts: 9,789

Re: Gather all csv files from a folder into a single sas table.

One of the most common questions on here.  Please check the Search option at the top before posting.  The simplest method if they are all the same structure (which if you want them all in one dataset seems likely) is to use a datastep with an infile ".../*.csv"; line.  

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 414 views
  • 0 likes
  • 3 in conversation