How do I unzip a PASSWORD PROTECTED .gz file using SAS code?
I know there is a way to unzip .gz files with SAS code, but is there a way to also open password protected .gz files using SAS code?
Example:
x gunzip --stdout "/mydir/test_gz_password_protected.sas7bdat.gz" > "/mydir/test_gz_no_password.sas7bdat";
How do I modify this to incorporate the password?
From what I've read gzip does not support password encryption. The techniques people use involve another tool to encrypt the content and then pipe it to gzip.
If that's the case, then expanding it to an unencrypted version would involve the reverse process. Unzip the gz, and pipe the content to the tool to decrypt. Without knowing how the original was encrypted we cannot offer a specific command syntax.
The FILENAME ZIP / GZIP method can't be used for this, at least not on its own.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.