BookmarkSubscribeRSS Feed
SASTad
Fluorite | Level 6


Hello All,

I'm trying to export a large data set to a .CSV format using the export option in SAS EG but it is taking a long time for me to export the data. Is there an alternative method to this?

The data set has 35740724 records.

Thanks.

3 REPLIES 3
SASKiwi
PROC Star

Try PROC EXPORT instead of the EG Export menu option. That will use the SAS server resources which should be a lot faster.

Kurt_Bremser
Super User

Exporting through EG means that the export is done in SAS and the result is transferred to the client where EG runs. Depending on the layout of the .csv, you may simply be limited by the network data transfer rate.

PROC EXPORT will only utilize the workspace server locally and may be much faster on its own; it also shows you the data step it generated in the log, which you can use for further optimization.

Try to reduce the record size of your .csv if possible. You can also compress the .csv (eg with gzip) before using a file transfer tool to put the file where you need it.

Patrick
Opal | Level 21

The EG Export Menu transfers your data from the SAS Server to the EG client and then as much as I know uses client side .net functionality to create a .csv file. The bottleneck is normally the network when transferring the data. So that's a good solution for low volume once-off tasks.

For high volumes or repeated tasks you want to do this .csv file creation programatically on the Server. You can use Proc Export for this or there is also a SAS utility macro %DS2CSV available Base SAS(R) 9.4 Utilities: Reference

Be aware that when executing the task on the server you need to write the output (the .csv) to a location available to the Server (so it can't be your local C: drive).

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2246 views
  • 0 likes
  • 4 in conversation