As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Tips Talk:Changing the Delimiter when Using ODS CSV

From sasCommunity
Jump to: navigation, search

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)


Moved the following comments to here from the Feb 13 Tip of the Day page. --Don Henderson (talk) 10:42, 13 February 2014 (CST)


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?

Of course, the PRINT procedure might seem more familiar. --peterC (talk) 10:22, 13 February 2014 (CST)