sas,zip 大型数据集,在 unix 服务器上保存 space
sas, zip large data sets, save space on unix server
压缩 SAS 数据集的最佳方法是什么?下面是我尝试使用 SAS 和 Putty 的代码。在 SAS 中,我没有收到说明这是否成功的日志。我确实得到了!感叹号。在 Putty 中,无论成功与否,我也没有收到任何消息。在 SAS 或 Putty 中压缩大型数据集的最佳和最快方法是什么?另外,有没有办法一次做多个数据集?另外,我认为日志也不错。谢谢!
SAS
LIBNAME ZIP '/server/department/analytics/data/PROJECT/';
x gzip /server/department/analytics/data/PROJECT/req1_txns1.sas7bdat;
腻子 Unix
cd /server/department/analytics/data/PROJECT/
gzip req1_txns2.sas7bdat
我喜欢(并强烈推荐)Stu 关于使用 %squeeze()
减少磁盘 space 的评论。但是如果你仍然想压缩数据集,你可以使用 ods package
来做同样的事情 refer.
一个使用示例 -
libname out '/project/path/here';
filename ds1 "%sysfunc(pathname(out))/sas_ds1.sas7bdat" recfm=n;
filename ds2 "%sysfunc(pathname(out))/sas_ds2.sas7bdat" recfm=n;
filename xl1 "%sysfunc(pathname(out))/xlfile1.xlsx" recfm=n; /*ensuring binary transfer*/
ods package (zip1) open nopf; /*creates a folder in-memory*/
ods package (zip1) add file=ds1;
ods package (zip1) add file=ds2;
ods package (zip1) add file=xl1;
ods package (zip1) publish archive
properties (archive_name="my_zipfile.zip" archive_path="%sysfunc(pathname(out))");
ods package (zip1) close; /*this saves it to disk*/
执行完这些之后,您的日志应该说明 SAS 正在将 zip1 写入提到的路径。并且,my_zipfile.zip
应该在您在倒数第二行 publish archive properties ()
.
中指定的文件夹中创建
压缩 SAS 数据集的最佳方法是什么?下面是我尝试使用 SAS 和 Putty 的代码。在 SAS 中,我没有收到说明这是否成功的日志。我确实得到了!感叹号。在 Putty 中,无论成功与否,我也没有收到任何消息。在 SAS 或 Putty 中压缩大型数据集的最佳和最快方法是什么?另外,有没有办法一次做多个数据集?另外,我认为日志也不错。谢谢!
SAS
LIBNAME ZIP '/server/department/analytics/data/PROJECT/';
x gzip /server/department/analytics/data/PROJECT/req1_txns1.sas7bdat;
腻子 Unix
cd /server/department/analytics/data/PROJECT/
gzip req1_txns2.sas7bdat
我喜欢(并强烈推荐)Stu 关于使用 %squeeze()
减少磁盘 space 的评论。但是如果你仍然想压缩数据集,你可以使用 ods package
来做同样的事情 refer.
一个使用示例 -
libname out '/project/path/here';
filename ds1 "%sysfunc(pathname(out))/sas_ds1.sas7bdat" recfm=n;
filename ds2 "%sysfunc(pathname(out))/sas_ds2.sas7bdat" recfm=n;
filename xl1 "%sysfunc(pathname(out))/xlfile1.xlsx" recfm=n; /*ensuring binary transfer*/
ods package (zip1) open nopf; /*creates a folder in-memory*/
ods package (zip1) add file=ds1;
ods package (zip1) add file=ds2;
ods package (zip1) add file=xl1;
ods package (zip1) publish archive
properties (archive_name="my_zipfile.zip" archive_path="%sysfunc(pathname(out))");
ods package (zip1) close; /*this saves it to disk*/
执行完这些之后,您的日志应该说明 SAS 正在将 zip1 写入提到的路径。并且,my_zipfile.zip
应该在您在倒数第二行 publish archive properties ()
.