Tips Talk:Changing the Delimiter when Using ODS CSV
Good tip. --Don Henderson 18:37, 26 January 2012 (EST)
Good tip--Art T 18:49, 26 January 2012 (EST)
good tip--Art Carpenter 11:43, 27 January 2012 (EST)
poorer performance (with enough data to measure it ~ say 1MB table ) than this alternate:
%let data = your.data ; filename demoFile "&data..csv" lrecl= 10000 ; proc contents data= &data noprint out= _data_ ; run ; proc sort; by varnum ; run ; data _null_ ; file demoFile DSD ; set _last_ put name @@ ; run ; * optional step to add a row of variable labels ; data _null_ ; file demoFile DSD MOD ; set _last_ ; label = coalescec( label, translate( propCase( name), ' ', '_' ) ) ; put label @@ ; run ; data _null_ ; file demoFile DSD MOD ; set &data ; put (_all_)(:) ; run ;
When the two techniques were compared on 1MB table sampsio.ausmap the data steps took sub-second time, but proc print method took 12 to 20 secs. I don't care about that performance for a 1MB table, but 10MB (.25 secs by data step and 2.25 mins by proc print) or 100MB?