I get an odd error code while trying to get a DS2 thread up and running.
proc ds2;
thread work.th_ieb /overwrite=yes;
dcl DOUBLE Beg_Jahr;
METHOD RUN();
set {select id, date
from DATA
};
IF FIRST.id THEN DO;
Beg_Jahr = YEAR(DATE);
OUTPUT;
END;
END;
endthread;
run;
The Error is:
ERROR: Compilation error.
ERROR: Illegal conversion for date or time type. Source line 34.
It works fine without the YEAR function. Any ideas?
date
actually has a date type. InPROC DS2
, there is actually a date data type, unlike in "traditional" SAS, where dates are stored as the number of days since January 1st, 1960. – Alex A.