Apologies .. I did not solve your issue, in the above post!! Your issue is the log message (which I am getting as well) and not the fact that the program is not running. I think the problem is in the statement following LEFT JOIN. You want to do LEFT JOIN of sales with dstDates but in the ON clause you are selecting both the common columns from sales. Also you are saying FROM sales sales. ON (sales.localStandard >=dst.date1 AND
sales.localDaylight <=dst.date2) I am sorry, I am not a SAS expert and thus can not understand what you want to achieve there but doing an alteration helped me get rid of the log. Below is the code and the output remains same. However this may not be what you want. There is some discussion on this error here. data dstDates;
format date1 datetime18.0 date2 datetime18.0;
input date1 datetime18.0 date2 datetime18.0;
cards;
10MAR2019:02:00:00 03NOV2019:02:00:00
;
run;
data sales;
format localStandard datetime18.0 localDaylight datetime18.0;
input salesDate datetime18.0;
localStandard=tzoneu2s(salesDate, 'EST');
localDaylight=tzoneu2s(salesDate, 'EDT');
cards;
08MAR2019:02:00:00
12MAR2019:02:00:00
;
run;
proc print data=sales;
title "Sales";
format salesDate datetime18.0;
run;
PROC SQL;
CREATE TABLE work.final1 as
SELECT
sales.salesDate,
localStandard,
localDaylight,
CASE WHEN date1 IS NOT NULL then localDaylight
else localStandard END AS newDate format datetime18.0
FROM sales
LEFT JOIN
dstDates dst ON (sales.localStandard =dst.date1 AND sales.localDaylight =dst.date2);
quit;
proc print data=final1;
format salesDate datetime18.0;
run;
... View more