xpt2sas(批量xport文件转为sas文件)

xpt2sas(批量xport⽂件转为sas⽂件)Folder 如下:
刀具论坛
xpt2sas 代码如下:
正交表/**
⽂件路径需修改
**/毛宣国
%macro xpt2sas;
data _null_;
call system("cd /file/raw/xpt");
run;
filename _dir pipe 'ls -la *.xpt' ;
data _import(keep=line);
length _dirline $200;
length _file $20;
length line $200.;胡 温
infile _dir recfm=v lrecl=200 truncover ;
input _dirline $1-200 ;
_file = scan(_dirline, 9, " ");
line = '%xpt2loc(libref=rawdata,filespec='||"'"||'/file/raw/xpt/'||strip(_file)||"'"||');';output; run;
filename outfile "/file/raw/xpt2loc.sas";
data _null_;
set _import end=eof;
file outfile dlm="" lrecl=32000;
put line;
大渡河造林局run;
x "perl -i -pe 's/\n/\r\n/g' /file/raw/xpt2loc.sas";
逆向建模filename outfile clear;
%mend;
%xpt2sas;
libname rawdata '/file/raw/';
%include '/file/raw/xpt2loc.sas';

本文发布于:2024-09-20 22:28:29,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/505547.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:转为   论坛   路径   造林   逆向   批量
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议