楼主: lxy_hb007
5909 1

[实际应用] 应用proc cimport转换proc cport生成的文件时,转换后的数据集打不开 [推广有奖]

  • 1关注
  • 0粉丝

已卖:1份资源

高中生

47%

还不是VIP/贵宾

-

威望
0
论坛币
278 个
通用积分
0.5061
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
351 点
帖子
7
精华
0
在线时间
36 小时
注册时间
2010-9-13
最后登录
2025-3-20

楼主
lxy_hb007 发表于 2015-12-7 23:52:41 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
proc cport生成的两个文件(baseline.xpt文件和baseline.sas7bdat文件)放在data文件夹中。

sas语句如下(参照sas帮助得到的),
libname newdata 'C:\Users\Desktop\data\newdata';
filename trans3 'C:\Users\Desktop\data\baseline.xpt';                        
proc cimport data=newdata.baseline infile=trans3;
run;
但 filename语句后又一句:host-option(s)-for-file-characteristicsn,不知道什么意思,因此忽略了。

运行程序后,log中其它没问题,只有下面的warning,应该也没问题。顺便说一下,我用的sas9.4。
WARNING: The transport file is from an earlier SAS release.  If this transport file contains non-English data, there might be
         problems importing national characters. If problems do occur, the transport file will need to be imported again. If the
         transport file was created by a Unicode SAS session, start a new SAS session, set the ENCODING startup option to UTF8,
         and redo the import.  Otherwise, set the LOCALE option to match the LOCALE of the SAS session which created the
         transport file and redo the import.
但在newdata的转换后数据集不能打开。
log中显示:
ERROR: Format YNDK not found or couldn't be loaded for variable abc.
ERROR: Format YNDK not found or couldn't be loaded for variable bcd.
ERROR: Format YNDK not found or couldn't be loaded for variable cde.
ERROR: Format YNDK not found or couldn't be loaded for variable def,
……
请大家指点迷津,谢谢。

二维码

扫码加我 拉你入群

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

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

关键词:import CPORT Port CIMP ROC 运行程序 Desktop warning 文件夹 Users

沙发
Libby1212 发表于 2018-10-30 10:07:03
libname 前加options nofmterr;

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

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