BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sasenthusiast07
Fluorite | Level 6

Hello my friends,

I have an question pertaining to appending the data to dataset.

Example : every week an file comes into the folder - which needs to be appended to the dataset.

I have 35 files --where in I have used infile * and created the dataset till this week -- which is all good.

Now next week if the file (.csv) come in - I want the new file to directly append to the dataset which is ready rather then reading entire 35 files+ new file and appending to the dataset.

In short question is : How can I append the data to existing dataset without reading previous files.

Thank you,

S

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You modify your code to append to an existing data set stored in a permanent location. You need to decide how many checks you need for your process as well - for example do you ever need to handle rollbacks, do you need to deal with cases where you may need to run it multiple times a day? I separate my reporting/data management processes so this isn't an issue typically. See an example here:

 

https://gist.github.com/statgeek/353374a5d8ea4f0c89ce5d80a47f4a4c

View solution in original post

1 REPLY 1
Reeza
Super User

You modify your code to append to an existing data set stored in a permanent location. You need to decide how many checks you need for your process as well - for example do you ever need to handle rollbacks, do you need to deal with cases where you may need to run it multiple times a day? I separate my reporting/data management processes so this isn't an issue typically. See an example here:

 

https://gist.github.com/statgeek/353374a5d8ea4f0c89ce5d80a47f4a4c

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!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 1 reply
  • 1452 views
  • 1 like
  • 2 in conversation