在Proc下载中的宏
我正在从服务器下载许多TXT文件。我可以一次成功执行一个文件。但是我有数据A中的许多文件路径的列表。 ”,但是程序返回错误。有人可以帮我吗?
data B ;
set A;
length link link2 $ 500;
link=substr(Name, 1);
link2= cats('/abc/', link);
keep link2;
run;
%let abc=server name;
options comamid=TCP remote=abc;
signon username=user password="xyz";
rsubmit;
* working well
proc download infile="/abc/000009.txt"
outfile="E:/test1.txt";
* not working
ERROR: Physical file does not exis
%let link3=link2;
proc download infile="&link3"
outfile="E:/&link3";
run;
I am downloading many txt file from a server. I can do one file at a time successfully. But the I have a list of many paths of files in data A. I try to create macro variables from paths such as " /abc/11551.txt, /abc/1832555.txt, /abc/18355557.txt", but the program return error. Could anyone please help me?
data B ;
set A;
length link link2 $ 500;
link=substr(Name, 1);
link2= cats('/abc/', link);
keep link2;
run;
%let abc=server name;
options comamid=TCP remote=abc;
signon username=user password="xyz";
rsubmit;
* working well
proc download infile="/abc/000009.txt"
outfile="E:/test1.txt";
* not working
ERROR: Physical file does not exis
%let link3=link2;
proc download infile="&link3"
outfile="E:/&link3";
run;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果意图是要下载数据集B中列出的文件,则首先将数据集移至远程服务器。
然后,您可以使用该数据生成PROC下载代码。
我看不出宏代码将如何帮助解决此问题。
If the intent was to download the file(s) listed in the dataset B then first move the dataset to the remote server.
Then you can use that data to generate PROC DOWNLOAD code.
I don't see how macro code would help with this problem.