楼主: shewoqishuini
5770 6

SAS中,怎么给变量转换名称不出错? [推广有奖]

  • 0关注
  • 1粉丝

已卖:160份资源

副教授

40%

还不是VIP/贵宾

-

威望
0
论坛币
1745 个
通用积分
9.0900
学术水平
1 点
热心指数
4 点
信用等级
1 点
经验
6691 点
帖子
362
精华
0
在线时间
1083 小时
注册时间
2009-4-30
最后登录
2024-8-26

楼主
shewoqishuini 发表于 2010-3-27 16:18:40 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
这是错误报告
ERROR: Some character data was lost during transcoding in the dataset ddfc.inf.
NOTE: The data step has been abnormally terminated.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.CP may be incomplete.  When this step was stopped there were 0
         observations and 8 variables.
WARNING: Data set WORK.CP was not replaced because this step was stopped.

这是我的语句命令
data cp;
set ddfc.inf;
rename   coe=scd;
run;

高手解答下!谢谢~
二维码

扫码加我 拉你入群

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

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

关键词:变量转换 observations observation Processing incomplete 变量 SAS 名称

本帖被以下文库推荐

沙发
viterbi 发表于 2010-3-27 20:04:18
不是语法问题而是数据问题吧

藤椅
shewoqishuini 发表于 2010-3-27 20:09:16
2# viterbi
呵呵,我感觉也可能原文件数据问题。

板凳
bobguy 发表于 2010-3-28 09:56:14
shewoqishuini 发表于 2010-3-27 16:18
这是错误报告
ERROR: Some character data was lost during transcoding in the dataset ddfc.inf.
NOTE: The data step has been abnormally terminated.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.CP may be incomplete.  When this step was stopped there were 0
         observations and 8 variables.
WARNING: Data set WORK.CP was not replaced because this step was stopped.

这是我的语句命令
data cp;
set ddfc.inf;
rename   coe=scd;
run;

高手解答下!谢谢~
I believe it is incompatible encoding error. The following help from SAS online may help.

Transcoding for NLS
Compatible and Incompatible Encodings
Overview to Compatible and Incompatible Encodings
ASCII is the foundation for most encodings, and is used by most personal computers, minicomputers, and workstations. However, the IBM mainframe uses an EBCDIC encoding. Therefore, ASCII and EBCDIC machines and data are incompatible. Transcoding is necessary if some or all characters in one encoding are different from the characters in the other encoding.
However, to avoid transcoding, you can create a data set and specify an encoding value that SAS will not transcode. For example, if you use the following values in either the ENCODING= data set option, or the INENCODING=, or the OUTENCODING= option in the LIBNAME statement, transcoding is not performed:
  • ANY specifies that no transcoding is desired, even between EBCDIC and ASCII encodings.
    Note:   ANY is a synonym for binary. Because the data is binary, the actual encoding is irrelevant.   
  • ASCIIANY enables you to create a data set that is compatible with all ASCII-based encodings.
  • EBCDICANY enables you to create a data set that is compatible with all EBCDIC-based encodings.
You might want to create a SAS data set that contains mixed encodings; for example, both Latin1 and Latin2. You do not want the data transcoded for either input or output processing. By default, data is transcoded to the current session encoding.
Data must be transcoded when the SAS file and the SAS session use incompatible encodings; for example, ASCII and EBCDIC.
In some cases, transcoding is not required because the SAS file and the SAS session have compatible encodings.
For a list of the encodings, by operating environment, see Encoding Values for a SAS Session.
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

报纸
shewoqishuini 发表于 2010-3-28 14:27:49
4# bobguy
thank you very much,though it's difficult for me to understand it entirely,i know the reason why it stops.

地板
cz851218 发表于 2010-3-30 16:27:53
语句没有错啊....

7
shewoqishuini 发表于 2010-3-30 21:33:24
6# cz851218
呵呵,语句是没有错的,也可能是没有建立新的逻辑库或者别的原因吧

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-24 19:39