停止 SAS 将 = 添加到文件路径末尾

问题描述 投票:0回答:1

我遇到 INFILE 和 PROC IMPORT 不起作用的问题,因为日志显示 SAS 正在向我从未指定的文件路径添加 = 符号。

Proc import out =  sasuser.tabdelim
datafile= “C:\Users\shaworth2\Documents\tabedelim.txt”
Dbms=tab replace;
getnames = YES
Run;

日志显示此错误

NOTE: The SAS System stopped processing this step because of errors.
260  Proc import out =  sasuser.tabdelim
261  datafile= “C:\Users\shaworth2\Documents\tabedelim.txt=”
               -
               22
               76
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.

ERROR 76-322: Syntax error, statement will be ignored.

262  Dbms=tab replace;
263  getnames = YES
264  Run;

有人对我如何阻止 SAS 认为我的数据文件路径末尾有一个 = 有任何建议吗?有没有命令或函数可以强制字符串结束?

我真的很感谢在这件事上我能得到的任何帮助

import sas
1个回答
0
投票

你的语法是正确的。问题是你的引号不正确。当你应该使用直引号时,你却使用了右引号和左引号,

"

U+201C:  “  Left Double Quotation Mark  - 226 128 156
U+201D:  ”  Right Double Quotation Mark - 226 128 157   
U+0022:  "  Straight Quotation Mark     - 034

当您从 Word 复制/粘贴某些内容时,通常会发生这种情况。

只需按键盘上的 Shift + 引号即可删除左/右引号并将其替换为

"
(直双引号)。

© www.soinside.com 2019 - 2024. All rights reserved.