BookmarkSubscribeRSS Feed
Obsidian | Level 7

Hello All,


 I'm using SAS 9.3, i have a situation like

1. To generate CSV for the Data and generate password protected ZIP of the CSV.

2. Get the properties of ZIP file like

                           Filename of data file
                           Data file creation date
                           Uncompressed data file size in bytes

                           Number of columns in data file (if applicable)
                           Number of rows in data file, including header row (if applicable)

     including the original file datetime stamps, file size, and compressed size.


Kindly, help me out with the situation. I could find the code for 9.4, however i cant find the code for 9.3




Diamond | Level 26 RW9
Diamond | Level 26

There isn't code SAS v9.3.  If you are sending a datafile, use a secure portal or SFTP.  Zip file via email is not really acceptable in this day and age, nor is taking file properties from the OS which can easily be manipulated.

Obsidian | Level 7

 Hi  RW9,


We have a client requirement to send it that way.

Diamond | Level 26 RW9
Diamond | Level 26

Then bill them the time each time to manual create a zip file and get the properties.  If they ask you to program whilst bouncing up and down and reciting the alphabet backwards...


Actually to say it isn't possible is a bit far, you would need to call the zipping program from the command line, e.g. X call or call system.  And of course have the privilidges to access command line.

Super User

You do not need to "get" the properties of the csv file, you already have them in the data step that writes the csv.

The other values are best determined by using operating system commands.


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 3 in conversation