0

I have the following question about my error message. I tried to format first then insert into dw to use.

26         proc sql   noprint;
27             connect to netezza  (user=jfan0001 pwd=Xw9b548s SERVER=bsnet01z database=PDWAPPRP  connection=global autocommit=yes);
29             execute ( create temporary table STDY 30                              ( SUB_NUM char(13) )) by netezza;
31             execute ( create temporary table ANTIB 32                              ( NDC char(11) )) by netezza;
33          
34         
35          
36             insert into dw.STDY (bulkload=YES   bl_options='logdir "."') 
37                         select SUB_NUM from pulllist       
38                          where flag='study';


ERROR: The open failed because library member DW.STDY.DATA is damaged.
NOTE: Data file SPARC.PULLLIST.DATA is in a format that is native to another host, or the file encoding does not match the session 
  encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce 
  performance.
user1238178
  • 135
  • 3
  • 10
  • Please edit your question and show the `LIBNAME` statement for `dw`. – BellevueBob Sep 12 '13 at 21:53
  • 1) Edit out your username/password/server to anonymous. 2) How to Netezza Temporary Tables work? Are these global, ie, available from any session, or are they local to the session they're created in? If they're the latter, your `LIBNAME` connection and your `CONNECT TO NETEZZA` connection are technically separate sessions, despite being from the same PC. In SQL SERVER, this wouldn't work as it stands. – Joe Sep 13 '13 at 14:05

1 Answers1

0

Could it be table DW.STDY was not created on your current host (server/PC) but was copyied from other OS or created by other version of SAS?

Check the table properties:

proc sql;
select libname, memname, datarep, datarepname, encoding from dictionary.tables
where libname ='DW'
and memname = 'STDY'
;
quit;

If datarep is not NATIVE, you'd have to recreate the table to be able to modify it. You can recreate it e.g. by copying to WORK and back to DW.

proc copy noclone in=DW out=WORK index=yes constraint=yes;
select STDY;
run;

proc copy in=DW out=WORK index=yes constraint=yes;
select STDY;
run;

Pls note the NOCLONE option in first proc copy to get rid of original data representation.

vasja
  • 4,732
  • 13
  • 15
  • STDY was a temporary table created just above. The CEDA warning is about SPARC.PULLIST, which is probably not an issue (the 'damaged' bit is). – Joe Sep 13 '13 at 14:04