SAS E Guide 5.1 在文件路径中创建额外的“/" [英] SAS E Guide 5.1 creating additional '/' in file path

查看:57
本文介绍了SAS E Guide 5.1 在文件路径中创建额外的“/"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景故事:我正在尝试使用 SAS Enterprise Guide 5.1 导出文件.我已经成功地这样做了一段时间.我有大量的 SAS 程序每天都可以正常运行,但最近我注意到 SAS 在文件路径中添加了额外的斜杠 (/),然后声称该路径是错误的.我的一个 SAS 程序每天运行了几个月,根本没有经过编辑,突然发现了这个问题!代码中没有任何变化!

Back story: I'm trying to export files using SAS Enterprise Guide 5.1. I've done so successfully for quite a while. I have tons of SAS programs that run everyday without issues, but recently I've noticed SAS adding additional slashes (/) in file paths, and then claiming that the path is wrong. One of my SAS programs that has ran daily for months, without being edited at all, has developed this problem out of no where! Nothing changed in the code!

这是我最近的导出尝试中遇到相同问题的日志:

Here is the log from my latest export attempt that is having the same issue:

     %PUT REPORTDATE = %sysfunc(intnx(day,%sysfunc(today()),-1),date7.);
     REPORTDATE = 16AUG15


     %LET FILE = filename_REPORTDATE..xlsx;



     PROC EXPORT
        DATA = finalData
        OUTFILE = "filepath/&FILE"
        DBMS = xlsx
        REPLACE;
        SHEET = "Sheet1";
     RUN;

     ERROR: Temporary file for XLSX file can not be created -> 
     /filepath//filename_REPORTDATE..$$1.  Make sure the path name is correct 
     and that you have write permission.

所以,路径不正确,我没有权限......因为它不存在那个额外的/.

So, the path isn't correct, and I don't have permission......because it doesn't exist with that extra /.

如果任何 SAS 向导能对此有所了解,我将不胜感激!

If any SAS wizards could shed some light on this, I'd appreciate it!

'filepath' 不是宏,出于隐私原因,我只是删除了实际的文件路径.这是一个写出的路径,/foo/bar/&FILE"

'filepath' is not a macro, I just removed the actual file path for privacy reasons. It is a written out path, "/foo/bar/&FILE"

推荐答案

我在我提到的两个问题上都发现了这个问题.

I have found the issue on both problems I had mentioned.

首先,主要问题是:SAS 似乎对文件路径区分大小写.实际文件夹的名称中有大写字母.我将 SAS 指向相同的文件路径,但使用小写字母.我意识到鉴于我的问题,您不可能看到这一点,但为了保护隐私,我不得不删除实际的文件路径.

First, the main issue: SAS appears to be case sensitive with file paths. The actual folder had capital letters in the name. I was pointing SAS toward the same file path, but in lower case letters. I realize you could not have seen this given my question, but to protect privacy, I had to remove the actual file path.

第二:我提到了一个已经运行了几个月的工作,突然出现了同样的问题.文件路径是可靠的,但它定期生成的文件随着时间的推移增长到 200MB 以上.我尝试将要转至 xlsx 的相同数据导出到 csv,一切正常.

Second: I mentioned a job that had been running for months and suddenly developed the same problem. The file path was solid, but the file it was producing on a regular basis had grown over time to be over 200MB. I tried exporting that same data that was going to xlsx to csv instead, and everything works.

我不确定这是否是 SAS 众所周知的事情",文件路径区分大小写,或者不导出到 xlsx 以获取更大的文件.(我发誓我过去导出过更大的文件!).我倾向于这么说,虽然这似乎是用户错误,但 SAS 的错误似乎并没有为我指明解决问题的正确方向.

I'm not sure if this is a well known 'thing' with SAS, being case sensitive with file paths, or not exporting to xlsx for larger files. (I would have swore I exported larger files in the past!). I would lean toward saying that, while this does appear to be user error, SAS's errors didn't seem to point me in the right direction of solving the problem.

感谢大家的努力,我很感激!

Thanks for everyone's efforts, I do appreciate it!

这篇关于SAS E Guide 5.1 在文件路径中创建额外的“/"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆