全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
4487 13
2016-07-27
libname fmt"e:\fmt";    /*这是自己建立的数据库,打算用来存储格式*/                                                                            
proc format library=fmt;                                                                                                               
value sexfmt      /*value name 中的name是按规则自己取吧?*/                                                                                                      
1='女'                                                                                                                                 
2='男';                                                                                                                                 
data one;                                                                                                                              
infile"C:\Users\Administrator\Desktop\练习用.txt" dlm="" missover;                                                                     
input no name$ sex rank age;                                                                                                            
proc print data=one;                                                                                                                    
format sex sexfmt.;    /*log中提示: The format SEXFMT was not found or could not be loaded。*/                                              
run;
原数据集中sex的值为1和2,分别代表男生和女生,但是运行程序后sex的取值仍然为1和2,并没有应为proc format语句改变,大家帮我看看吧?这个问题该如何处理?先谢谢了!                                                                                                                                   



二维码

扫码加我 拉你入群

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

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

全部回复
2016-7-27 13:19:25
you should make sure this format is present in the WORK library. You just stored in the fmt library. Thanks
二维码

扫码加我 拉你入群

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

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

2016-7-27 14:11:33
需要先告诉SAS从那个Library里面查找格式。可以加上如下语句:
Option fmtsearch=(fmt);
二维码

扫码加我 拉你入群

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

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

2016-7-27 14:36:29
suzhzh 发表于 2016-7-27 13:19
you should make sure this format is present in the WORK library. You just stored in the fmt library. ...
so,how can i present the format to the work library?
by the way: should the format be in work library? i have already store it in fmt library, then i just invoking the format from it?
二维码

扫码加我 拉你入群

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

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

2016-7-27 14:40:49
Arithmetic09 发表于 2016-7-27 14:11
需要先告诉SAS从那个Library里面查找格式。可以加上如下语句:
Option fmtsearch=(fmt);
还是不太明白,程序中已经在format sex sexfmt.难道不是应用之前proc format定义的格式吗?
二维码

扫码加我 拉你入群

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

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

2016-7-27 14:42:43
suzhzh 发表于 2016-7-27 13:19
you should make sure this format is present in the WORK library. You just stored in the fmt library. ...
so how can i prescent the format to the work library? thank u
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群