0

我在将大型 Oracle 表转换为 SAS 数据集时遇到问题。我早些时候这样做了,并且该方法有效。但是,这一次,它给了我以下错误消息。

SAS code:

option compress = yes;
libname sasdata ".";
libname myora oracle user=scott password=tiger path=XYZDATA ;
data sasdata.expt_tabl;
   set myora.expt_tabl;
run;

Log file:

You are running SAS 9. Some SAS 8 files will be automatically converted
by the V9 engine; others are incompatible.  Please see
http://support.sas.com/rnd/migration/planning/platform/64bit.html

PROC MIGRATE will preserve current SAS file attributes and is
recommended for converting all your SAS libraries from any
SAS 8 release to SAS 9.  For details and examples, please see
http://support.sas.com/rnd/migration/index.html


This message is contained in the SAS news file, and is presented upon
initialization.  Edit the file "news" in the "misc/base" directory to
display site-specific news and information in the program log.
The command line option "-nonews" will prevent this display.




NOTE: SAS initialization used:
      real time           1.63 seconds
      cpu time            0.03 seconds

1          option compress = yes;
2          libname sasdata ".";
NOTE: Libref SASDATA was successfully assigned as follows:
      Engine:        V9
      Physical Name: /******/dibyendu
3          libname myora oracle user=scott password=XXXXXXXXXX path=XYZDATA ;
NOTE: Libref MYORA was successfully assigned as follows:
      Engine:        ORACLE
      Physical Name: XYZDATA
4          data sasdata.expt_tabl;
5             set myora.expt_tabl;
6          run;

NOTE: There were 6422133 observations read from the data set MYORA.EXPT_TABL.DATA.
ERROR: Expecting page 1, got page -1 instead.
ERROR: Page validation error while reading SASDATA.EXPT_TABL.DATA.
ERROR: Expecting page 1, got page -1 instead.
ERROR: Page validation error while reading SASDATA.EXPT_TABL.DATA.
ERROR: File SASDATA.EXPT_TABL.DATA is damaged. I/O processing did not complete.
NOTE: The data set SASDATA.EXPT_TABL.DATA has 6422133 observations and 49 variables.
ERROR: Expecting page 1, got page -1 instead.
ERROR: Page validation error while reading SASDATA.EXPT_TABL.DATA
ERROR: Expecting page 1, got page -1 instead.
ERROR: Page validation error while reading SASDATA.EXPT_TABL.DATA.
ERROR: Expecting page 1, got page -1 instead.
2                                                          The SAS System                                21:40 Monday, April 1, 2013

ERROR: Page validation error while reading SASDATA.EXPT_TABL.DATA.
ERROR: Expecting page 1, got page -1 instead.
ERROR: Page validation error while reading SASDATA.EXPT_TABL.DATA.
NOTE: Compressing data set SASDATA.EXPT_TABL.DATA decreased size by 78.88 percent.
      Compressed is 37681 pages; un-compressed would require 178393 pages.
ERROR: File SASDATA.EXPT_TABL.DATA is damaged. I/O processing did not complete.
NOTE: SAS set option OBS=0 and will continue to check statements. This might cause NOTE: No observations in data set.
NOTE: DATA statement used (Total process time):
      real time           8:55.98
      cpu time            1:39.33


7

ERROR: Errors printed on pages 1,2.

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           8:58.67
      cpu time            1:39.40

这是在 RH Linux 服务器上运行的。

任何建议将不胜感激。

谢谢并恭祝安康,

4

2 回答 2

1

这听起来像是您服务器上的空间问题。您的默认目录中的文件系统有多大(根据您的libname sasdata '.';声明)?使用 Oracle 表引用上的数据集选项obs=1创建一个包含一行的新 SAS 数据集并检查变量。

data sasdata.dummy_test;
     set myora.expt_tabl(obs=1);
run;

也许有非常大的 VARCHAR 或 BLOB 列占用了太多空间。请记住,SAS 没有 VARCHAR 类型。

于 2013-04-02T16:38:28.523 回答
0

虽然我不完全确定,但我相信主要问题是我最初试图在目录中创建/写入数据集,这在某种(?)意义上受到限制。这间接造成了麻烦,因为创建的数据集有缺陷。当我在其他地方创建它时,没关系。

谢谢和问候, Dibyendu

于 2013-04-03T19:30:29.517 回答