全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
5699 10
2013-11-30
为什么文件名里有空格,filename就识别不了,如下:

options noxwait xsync;
filename dirpipe pipe"Dir D:\DATA\Analysts Forecasts";

Data _Null_;
      infile dirpipe;
          input;
          put _n_ _infile_;
Run;

把路径改成 D:\DATA\AnalystsForecasts 没有了空格就可以了,如下:


options noxwait xsync;
filename dirpipe pipe"Dir D:\DATA\AnalystsForecasts";

Data _Null_;
      infile dirpipe;
          input;
          put _n_ _infile_;
Run;

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-11-30 21:03:11
PLS try :

options noxwait xsync;
filename dirpipe pipe ' Dir  "D:\DATA\Analysts Forecasts" ';

Data _Null_;
      infile dirpipe;
          input;
          put _n_ _infile_;
Run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-11-30 22:51:38
webgu 发表于 2013-11-30 21:03
PLS try :

options noxwait xsync;
嗯,单独这样是可以。不过我有个宏变量Path,这样好像又不行了,请问应如何modify一下呢,谢谢

%let path=D:\DATA\Analysts Forecasts;

options noxwait xsync;
filename dirpipe pipe ' Dir  "&path" ';

Data _Null_;
      infile dirpipe;
          input;
          put _n_ _infile_;
Run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-12-1 08:39:12
If I remebered correctly, I worked around this problem by
复制代码
jingju
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-12-1 10:03:10
jingju11 发表于 2013-12-1 08:39
If I remebered correctly, I worked around this problem by jingju
My solution is :

pipe  %unquote(%str(%' dir  "&dir"  %'));
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-12-1 10:50:09
jingju11 发表于 2013-12-1 08:39
If I remebered correctly, I worked around this problem by jingju
It didn't work in my pc, and I don't know why.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群