全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 悬赏大厅
3447 4
2017-03-24
悬赏 120 个论坛币 未解决
在添加了启动代码后(libname 和路径后)依然报错如下:“无法定位该表的sas格式,请确保格式搜索路径中列出了这些格式的位置 您可以将该代码添加zhi项目启动代码中。”
然而!我启动代码里添加了该数据源的libname了,为何依然如此?同样该路径下,另一个文件就ok没问题,但就是这个文件,死活报这个错,增减变量都不行。
二维码

扫码加我 拉你入群

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

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

全部回复
2017-3-24 20:41:05
not sure what exact the problem is since you didn't provide the library info, but you can try:
1. reformat the library

libname mydir "catalog directory";
libname mylibrary (mydir);
proc format library=mylibrary cntlin=mydir.myformats;
run;

or

2. export the library then import the library

libname project "catalog directory";
filename outfile "temp location/cport file.cpt";
proc cport library=project file=outfile;
run;

Good luck!
二维码

扫码加我 拉你入群

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

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

2017-3-25 11:22:15
Newkoarla 发表于 2017-3-24 20:41
not sure what exact the problem is since you didn't provide the library info, but you can try:
1. r ...
谢谢,大神,我的启动代码是libname datasamp "/Workspace/Sas/data_samp";而且我通过在新建里面建逻辑库也把该路径命名为samp了。
以前用过EM,都是work的。这次,能打开其他的数据源,但就我想用的这个打不开。
同目录下有多个文件,文件1和文件2都能通过“创建数据源”来引入打开,就我这个文件3会报错,但是文件格式都是sas的data文件。我现在感觉是不是和启动代码的路径无关呢?
对文件有要求吗?我文件名sta,文件里就俩变量,appl_type_cd 和lgd,format一个是字符,一个是w8.4的数值型
二维码

扫码加我 拉你入群

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

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

2017-3-26 10:43:20
It may be related to variable formatting of your raw data, so add one line of code below at the head of your program and try again, good luck!

option nofmterr;
二维码

扫码加我 拉你入群

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

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

2017-10-31 06:10:55
When creating a data source in SAS® Enterprise Miner™, you might receive the following error:
Advisor Error: SAS Formats for this table could not be located.
Make sure their location is in the format search path.
You can add this code to the project start-up code.
The problem occurs if formats (or informats) are assigned to variables in the data set, and those formats are not available to SAS Enterprise Miner. (Note that specifying the SAS option NOFMTERR in the Project Start Code does not correct the problem.)
To circumvent the problem, either point to the location of the formats (or informats), or disassociate the formats (or informats) from the data.



Point to the location of the formats. In the Project Start Code, add a LIBNAME statement to allocate the format library. Add an OPTIONS statement to specify a FMTSEARCH= search path that points to the library that you just allocated.  To access the Project Start Code, click the project name in the project panel (upper left corner of the user interface).  Then, click Project Start Code in the properties panel (middle left).

Example:

libname mylibrary "c:\my_format_library";
options fmtsearch=(mylibrary work library);

Disassociate the format (or informat). One reason to disassociate is that you no longer have access to the format catalog. You can remove the format (or informat) from the variable in that data set using PROC DATASETS.

Example:


proc datasets lib=mylibrary;
    modify mydata;
   format myvariable;
   informat myvariable;
   quit;
In the above example, the format (and informat) is removed only from the variable MYVARIABLE. All other variables maintain their format (and informat). You can also specify FORMAT _ALL_ within DATA step code to remove formats from all variables in the data set. FORMAT _ALL_ removes not only user-defined formats, but also removes SAS specific formats (such as date formats). Likewise, you can specify INFORMAT _ALL_.

Example:

data mylibrary.mydata;
   set mylibrary.mydata;
   format _all_;
   informat _all_;
   run;

For more information about formats, see Base SAS documentation.
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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