We have a requirement to scan the SAS code and then unzip all the input files used in program(data step, proc step, proc sql etc) and zip it back at the end of program using 7z. Does anyone face the same problem? if yes, kindly share the sample code.
Asked
Active
Viewed 446 times
-2
-
You need to explain your problem in more detail but it sounds like a process issue. Do you know all of the input files or do you need to parse program first? Zip/Unzip files is relatively easy - as long as you can use system commands, getting the list of input files will be more difficult in my opinion. – Reeza Mar 23 '16 at 16:19
-
Are you talking about enterprise guide projects? – Robert Penridge Mar 23 '16 at 17:06
-
We have thousands of program/macros in SAS under unix which uses and creates on an average 5-10 files each. Identifying each dataset and using system command for uncompressing/compressing will be very tedious task. Wondering if there a script which will scan the code and gives us a list of input files used and then later gives a list of new files created. – Data Nevel Sleeps Mar 23 '16 at 18:00
-
Is 7zip that much better than adding compression by default to all your SAS datasets? – Reeza Mar 24 '16 at 03:02
1 Answers
0
You will have a hard time scanning code to determine what files it writes. You would basically need to write a SAS compiler. You will much more luck scanning the log generated when the programs are run instead. You can get a lot of information from the notes that SAS puts into the log.

Tom
- 47,574
- 2
- 16
- 29
-
Replying to Reeza's question, we already have SAS compression enabled, but it gives us less than 50% storage savings whereas 7zip can give more than 80%. Moreover, compressing small to medium SAS datasets increase the storage requirement then decreasing. – Data Nevel Sleeps Mar 24 '16 at 12:49