Date: Mon, 28 Sep 2009 10:23:51 -0700
Reply-To: Anaconda <rune@FASTLANE.NO>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Anaconda <rune@FASTLANE.NO>
Organization: http://groups.google.com
Subject: ERROR: DATA STEP Component Object failure
Content-Type: text/plain; charset=ISO-8859-1
Here is a simple piece of code that causes an error and warning in the
SAS log. I don't understand this errror message, what it tries to tell
me:
data testdata;
length Testpunkt $2.;
input Testpunkt;
datalines;
02
09
09
09
16
16
17
19
19
;
run;
Filename GenFile "D:\SAS_KODE\Generate_testdata.sas";
data _null_;
set testdata end = last;
by Testpunkt;
file GenFile linesize = 32767;
if Testpunkt.first then do;
x01 = 'data work.Meta_tp' ||compress(Testpunkt) ||
'_samanfatning' ;
x02 = 'set testdata;' ;
x03 = 'if Testpunkt eq' || compress(Testpunkt) || ' then
output;' ;
put @01 x01;
put @04 x02;
put @04 x03;
end;
if Testpunkt.last then do;
x04 = 'run;' ;
put @01 x04;
end;
run;
%include GenFile;
/*
11877 data _null_;
11878 set testdata end = last;
11879 by Testpunkt;
11880 file GenFile linesize = 32767;
11881 if Testpunkt.first then do;
---------------
557
ERROR: DATA STEP Component Object failure. Aborted during the
COMPILATION phase.
ERROR 557-185: Variable Testpunkt is not an object.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
11882 x01 = 'data work.Meta_tp' ||compress(Testpunkt) ||
'_samanfatning' ;
11883 x02 = 'set testdata;' ;
11884 x03 = 'if Testpunkt eq' || compress(Testpunkt) || ' then
output;' ;
1
12039
12040 %include GenFile;
WARNING: Physical file does not exist, D:\SAS_KODE
\Generate_testdata.sas.
ERROR: Cannot open %INCLUDE file GENFILE.
*/
The code is not real, but the problem is real. The code is
oversimplified. It is about getting SAS to create code based on a
dataset (in this case the dataset TESTDATA.
- Anaconda