sas - Proc report is exporting file size larger than expected -


this code generating file size greater 5mb, though have 3200 records. suggestions ? appreciated. have been struggling past 2 days.

it giving me insufficient memory error. have other codes similar 1 , able run code without errors.

%macro report(date);  %let a= %eval(%sysfunc(today()); %let year= %sysfunc(putn(&a,year4.)); %let mon= %sysfunc(putn(&a,month2.)); %let day= %sysfunc(putn(&a,day2.));   proc sql;  create table vdata.report select country, province, city, code, link, activity, first_name, last_name,  is_coordinator, is_host, email, phone, business_group, managers_email, transportation v_data.raw_plus_&date;  quit;   proc sort data=vdata.pm_report; country province activity last_name; run;   ods listing close; ods tagsets.excelxp file="/path/ report - &date..xml"; ods tagsets.excelxp options (sheet_name="report");  proc report data=vdata.report nowd  style(header)=[font_weight=bold background=cxdce6f1 font_size=1.2 ] ; column ("registration of &year-&mon-&day" ("report" country province city code link activity first_name last_name  is_coordinator is_host email phone business_group managers_email  transportation));  define  country / display format= $char100. style(column)=[width=75 font_size=1] style(header)=[background = cxc2d69a]   spacing=2   left "country" ; define  province / display format= $char100. style(column)=[width=60 font_size=1] style(header)=[background = cxc2d69a]  spacing=2   left "province"; define  city / display format= $char100. style(column)=[width=80 font_size=1]  style(header)=[background = cxc2d69a]   spacing=2   left "city" ; define  code / display format= $char100. style(column)=[width=170 font_size=1]  style(header)=[background = cxc2d69a]  spacing=2   left "project id#" ; define  link / display format= $char100. style(column)=[width=200 font_size=1] style(header)=[background = cxc2d69a]    spacing=2   left "region" ; define  activity / display format= $char100. style(column)=[width=500 font_size=1]  style(header)=[background = cxc2d69a]  spacing=2   left "select activity" ; define  first_name / display format= $char100. style(column)=[width=90 font_size=1]  style(header)=[background = cxc2d69a]  spacing=2   left "first name" ; define  last_name / display format= $char100. style(column)=[width=220 font_size=1] style(header)=[background = cxc2d69a]   spacing=2   left "last name" ; define  is_coordinator / display format= $char100. style(column)=[width=120 font_size=1] style(header)=[background = cxc2d69a]   spacing=2   left "activity coordinator" ; define  is_host / display format= $char100. style(column)=[width=80 font_size=1]  style(header)=[background = cxc2d69a]  spacing=2   left "host" ; define  email / display format= $char100. style(column)=[width=250 font_size=1]  style(header)=[background = cxc2d69a]  spacing=2   left "e-mail" ; define  phone / display format= $char100. style(column)=[width=100 font_size=1]  style(header)=[background = cxc2d69a]  spacing=2   left "phone #" ; define  business_group / display format= $char100. style(column)=[width=270 font_size=1]  style(header)=[background = cxc2d69a]  spacing=2   left "business group" ; define  managers_email / display format= $char100. style(column)=[width=220 font_size=1]  style(header)=[background = cxc2d69a]  spacing=2   left "reporting managers email" ; define  transportation / display format= $char100. style(column)=[width=220 font_size=1] style(header)=[background = cxc2d69a]   spacing=2   left "transportaion needed?" ;  compute country; if country = "canada"      call define(_row_, 'style', 'style = {background=#ffffff font_size=1}' ); else if country = "united states"     call define(_row_, 'style', 'style = {background=#ffffff font_size=1}' ); endcomp;   run;   ods ods tagsets.excelxp close;  %mend; 

thanks in advance.

i haven't tested i'll hazard guess width of fields exporting.

check width of of variables being exported excel. they're wide. combined have width of 2500 bytes.

width*rows = ~2500*3200 = 8,000,000 bytes = 8 megabytes 

i'm not sure if excel compression on consecutive space characters, if not, explain size.

for variables excessively wide, assign them appropriate width length statement. i'm pretty sure don't need width of 100 phone number (for example).


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -