BookmarkSubscribeRSS Feed
mvk_sas
Calcite | Level 5

I have dataset example Test which has huge data present in that, its located in unix server.

I have some new data which need to be appended to the existing dataset (say test has 10 years data , 11th year data is new data) in that case i want to check the dataset filesize and disk free space before archiving the 1 year data. Anytime you open the file i should have only 10 years data.

This has to be done through SAS coding.

I would appreciate if someone help me on this.

Thanks in advance..MVK

3 REPLIES 3
Patrick
Opal | Level 21

What about storing data in yearly data sets? That would circumvent such issues. https://communities.sas.com/message/136439#136439

For checking the filesize and especially how much space is left on disk you will need to issue an OS command like DF and then pipe the result into your SAS process for further execution.

If you follow this "yearly datasets" approach then it would be easier: You first archive the oldest year (give you space) then you create the most current year. The one issue with having yearly slices with a view on top is when it comes to the need to create and use indexes. On the other hand if people are only interested in the current year then having a single physical table only containing this current year is kind of unbeatable.

mvk_sas
Calcite | Level 5

Adding to the question , is there a way that to find out the Disk space command included in the code then append the data to the dataset.

Yes its great idea to create datasets splitting them with yearly data.

Doc_Duke
Rhodochrosite | Level 12

If you really want to automate the disk space check, you can run it through the 'X" command in SAS and then capture and parse the results to use in your branching logic.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 1011 views
  • 3 likes
  • 3 in conversation