It runs fine when not using custom formats in the query:
proc sql;
create table universe_national as
select Month,
/* PUT(zipcode,$fzipcn.) as Region_Code,*/
/* PUT(zipcode,$fzipcn.) as Region_Name,*/
SUM(universe) as Universe
from UNIVERSE.amicount
where Month GE '01JAN2000'd and Month LE ¤t.
group by Month/*, Region_Code, Region_Name*/;
quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 38.33 seconds
user cpu time 48.38 seconds
system cpu time 2.96 seconds
However, it takes 30 minutes to execute and bombs if they are included in the select statement and then in the group by statement:
proc sql;
create table universe_national as
select Month,
PUT(zipcode,$fzipcn.) as Region_Code,
PUT(zipcode,$fzipcn.) as Region_Name,
SUM(universe) as Universe
from UNIVERSE.amicount
where Month GE '01JAN2000'd and Month LE ¤t.
group by Month, Region_Code, Region_Name;
quit;
ERROR: Sort execution failure.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 26:07.29
user cpu time 35:52.91
system cpu time 10:54.76
... View more