Features: |
SOURCE statement DEFINE TAGSET statement: : DEFINE EVENT statement |
proc template; source tagsets.csv; run;
1 proc template; NOTE: Writing HTML Body file: sashtml.htm 2 source tagsets.csv; define tagset Tagsets.Csv; notes "This is the CSV definition"; mvar _CURRENCY_SYMBOL _DECIMAL_SEPARATOR _THOUSANDS_SEPARATOR _CURRENCY_AS_NUMBER _PERCENTAGE_AS_NUMBER _DELIMITER; define event initialize; trigger set_options; trigger documentation; trigger compile_regexp; end; define event options_set; trigger set_options; trigger documentation; trigger compile_regexp; end; define event documentation; trigger help /if cmp( $options["DOC"], "help"); trigger quick_reference /if cmp( $options["DOC"], "quick"); end; define event help; putlog "=============================================================================="; putlog "The CSV Tagset Help Text."; putlog " "; putlog "This Tagset/Destination creates output in comma separated value format."; putlog " "; putlog "Numbers, Currency and percentages are correctly detected and show as numeric ...more lines of log... define event warning; break /if ^$notes; put VALUE NL; end; mapsub = "/""""/"; map = """"; registered_tm = "(r)"; trademark = "(tm)"; copyright = "(c)"; output_type = "csv"; stacked_columns = OFF; end; NOTE: Path 'Tagsets.Csv' is in: SASHELP.TMPLMST. 3 run; NOTE: PROCEDURE TEMPLATE used (Total process time): real time 13.14 seconds cpu time 0.63 seconds
proc template; define tagset Tagsets.mycsv; notes 'This is the My CSV template'; define event table; start: put nl; finish: put nl; end; define event put_value; put VALUE; end; define event put_value_cr; put VALUE NL; end; define event row; finish: put NL; end; define event header; start: put ',' /if ^cmp( COLSTART, '1'); put ''''; put VALUE; finish: put ''''; end; define event data; start: put ',' /if ^cmp( COLSTART, '1'); put ''''; put VALUE; finish: put ''''; end; define event colspanfill; put ','; end; define event rowspanfill; put ',' /if ^exists( VALUE); end; define event breakline; put NL; end; define event splitline; put NL; end; registered_tm = '(r)'; trademark = '(tm)'; copyright = '(c)'; output_type = 'csv'; stacked_columns = OFF; end; end;
proc template; define tagset Tagsets.Mycsv / store = Sasuser.Templat; notes 'This is the My CSV template'; define event table; start: put NL; finish: put NL; end; define event put_value; put VALUE; end; define event put_value_cr; put VALUE NL; end; define event row; finish: put NL; end; define event header; start: put ',' /if ^cmp( COLSTART, '1'); put ''''; put VALUE; finish: put ''''; end; define event data; start: put ',' /if ^cmp( COLSTART, '1'); put ''''; put VALUE; finish: put ''''; end; define event colspanfill; put ','; end; define event rowspanfill; put ',' /if ^exists( VALUE); end; define event breakline; put NL; end; define event splitline; put NL; end; output_type = 'csv'; copyright = '(c)'; trademark = '(tm)'; registered_tm = '(r)'; stacked_columns = OFF; end; run;