请选择 进入手机版 | 继续访问电脑版
楼主: melody21
15216 11

[问答] SAS 因encoding,transcode 问题无法读入外部数据 [推广有奖]

  • 4关注
  • 6粉丝

讲师

49%

还不是VIP/贵宾

-

威望
0
论坛币
3199 个
通用积分
462.0354
学术水平
36 点
热心指数
48 点
信用等级
36 点
经验
138 点
帖子
349
精华
0
在线时间
544 小时
注册时间
2007-7-14
最后登录
2023-2-4

melody21 发表于 2015-3-25 03:16:54 |显示全部楼层 |坛友微信交流群
相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
问题:
导入外部文件不成功,SAS提供以下错误说明:
"
An error occured executing the workspace job ''program'. Integration  technologies failed to submit the code.[error] Failed to
transcode data from U_UTF8_CE to U_WLATIN1_CE encoding because it contained characters which are not supported by your SAS session encoding. Please review your encoding= and locale= SAS system options to ensure that they can accommodate the data that you want to process. A portion of the source string, in hex representation is:
[None] 5c88184:3b 2a 27 3b 2a 22 3b 2a 2f 3b 71 75 69 74 3b 72 |;*';*";*/;quit;r|
[None]5c88194: 75 62 3b 0d 0a 4f 50 54 49 4f 4e 53 20 50 41 47 |un;..OPTIONSPAG|
[Error] Some code points did not transcode.
"
原文请看下面。

SAS error message

SAS error message

我觉得问题可能在两个方面:1。外部数据包含SAS系统不识别的文字 2。外部数据产生的系统与SAS所在系统不匹配。
我的系统是windows,SAS是英文版EG, 察看proc options group=languagecontrol; run; Log 如下:
GOPTIONS ACCESSIBLE;
15 proc options group=languagecontrol; run;
SAS (r) Proprietary Software Release 9.3 TS1M0
 
Group=LANGUAGECONTROL
DATESTYLE=MDY Identify sequence of month, day and year when ANYDATE informat data is ambiguous
DFLANG=ENGLISH Language for EURDF date/time formats and informats
NOLOCALELANGCHG Do not change the language of SAS message text in ODS output when the LOCALE
option is specified
PAPERSIZE=LETTER Size of paper to print on
RSASIOTRANSERROR Display a transcoding error when illegal data values for a remote application
TRANTAB=(lat1lat1,lat1lat1,wlt1_ucs,wlt1_lcs,wlt1_ccl,,,)
Names of translate tables
URLENCODING=SESSION
Specifies URL percent encoding for the URLENCODE and URLDECODE functions
NODBCS Do not process double byte character sets
DBCSLANG=NONE Specifies the double-byte character set (DBCS) language to use
DBCSTYPE=NONE Specifies a double-byte character set (DBCS) encoding method
ENCODING=WLATIN1 Specifies default encoding for internal processing of data
LOCALE=EN_US Specifies the current locale for the SAS session
NONLSCOMPATMODE Uses the user specified encoding to process character data

我尝试的解决方法:
1。LOCALE=EN_US=== 修改为zh_CN;不行。
2。修改encoding, 用如下语句
filenamett 'H:\data1.txt' encoding='wlatin1' ;
encoding 的取值试过:ANYASCIIANY EBCDICANY Utf-8 ms-950 ms-936 ms-932 ms-949
还是一样的结果。
请问该怎么尝试?
谢谢。






二维码

扫码加我 拉你入群

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

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

关键词:Coding Trans code DING COD because process system Failed ensure

melody21 发表于 2015-3-27 05:19:31 |显示全部楼层 |坛友微信交流群
顶一顶

使用道具

sas9.4 发表于 2015-4-2 21:38:28 |显示全部楼层 |坛友微信交流群
encoding= any ;
已有 1 人评分论坛币 收起 理由
admin_kefu + 5 热心帮助其他会员

总评分: 论坛币 + 5   查看全部评分

使用道具

condor_gz 在职认证  发表于 2015-12-14 02:03:28 |显示全部楼层 |坛友微信交流群
你先确认
......\Program Files\SASHome\SASFoundation\9.4\nls  有没有 U8 文件夹。

然后,......\Program Files\SASHome\SASFoundation\9.4\sasv9.cfg  

将这个文件中的配置,改为

-config "C:\Program Files\SASHome\SASFoundation\9.4\nls\u8\sasv9.cfg"

这样你再重试一下。
已有 1 人评分论坛币 收起 理由
admin_kefu + 20 热心帮助其他会员

总评分: 论坛币 + 20   查看全部评分

使用道具

x124837592 发表于 2016-4-3 22:16:21 |显示全部楼层 |坛友微信交流群
condor_gz 发表于 2015-12-14 02:03
你先确认
......\Program Files\SASHome\SASFoundation\9.4\nls  有没有 U8 文件夹。
正解啊!

使用道具

Nymeria 发表于 2016-6-17 10:15:27 |显示全部楼层 |坛友微信交流群
x124837592 发表于 2016-4-3 22:16
正解啊!
我的文件夹有u8,但是我还是报错,关键是我的脚本一会儿能跑,一会就报跟你一样的错误,简直了无语了。。。

使用道具

Nymeria 发表于 2016-6-17 10:15:28 |显示全部楼层 |坛友微信交流群
x124837592 发表于 2016-4-3 22:16
正解啊!
我的文件夹有u8,但是我还是报错,关键是我的脚本一会儿能跑,一会就报跟你一样的错误,简直了无语了。。。

使用道具

hollowman 发表于 2016-7-27 09:18:22 |显示全部楼层 |坛友微信交流群
x124837592 发表于 2016-4-3 22:16
正解啊!
我也是同样的问题,用这个方法解决了!谢谢!!

使用道具

jarsky 发表于 2017-8-10 21:15:39 |显示全部楼层 |坛友微信交流群
condor_gz 发表于 2015-12-14 02:03
你先确认
......\Program Files\SASHome\SASFoundation\9.4\nls  有没有 U8 文件夹。
可用。厉害。

使用道具

jarsky 发表于 2017-8-10 21:16:03 |显示全部楼层 |坛友微信交流群
sas9.4 发表于 2015-4-2 21:38
encoding= any ;
大神,
我的是win7 64位系统 SAS9.4。encoding=any在哪里写?
base 中文简体里系统选项都没法修改encoding值,只能是euc-cn。
EG里怎么把euc-cn改为utf-8?

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-18 13:19