學習筆記

Here I collect my study notes on SAS, including tips, sample codes, links, papers, ......
正文

ODS OPTIONS

(2010-11-14 18:09:35) 下一個
proc options;
run;

ODS destination FILE = 'file-specification'
                          
OPTIONn = valuen (SUBOPTIONn = valuen)
                          
OPTIONn;


SAS system options affect ODS output:

DATA | NODATE
NUMBER | NONUMBER
PAGENO =
ORIENTATION = PORTRAIT (default) or LANDSCAPE
TOPMARGIN =
BOTTOMMARGIN =
LEFTMARGIN =
RIGHTMARGIN =

option date dtreset;


Global system options for PDF:
Help-->SAS Help and documentation-->Contents-->SAS Products-->Base SAS-->SAS 9.2 Language Reference: Dictionary-->Dictionary of Language Elements-->SAS System Options-->SAS Systems Options by Category

pdfpagelayout = default / continuousfacing
pdfpageview = default / fitpage


Title and footnote options:

title attibute = 'attribute-value' 'title-text';

COLOR ='purple' / 'Courier New' / green / red / blue
FONT = "Courier New" / "Times"
JUSTIFY = LEFT | RIGHT | CENTER
LINK = "low_volume.html" | 'link_title.pdf'
HEIGHT = 12pt
ITALIC
BOLD


In-line formatting with ODS escapechar:

ODS escapechar = '#';
.....
  footnote1 '--#{thispage}--'; /*work on pdf and rtf*/
  footnote2 j = r 'Page #{thispage} of #{lastpage}'; /*for pdf and rtf*/
 
  footnote j = l 'Page #{pageof}'; /*for rtf*'

 footnote '#{super 1} .........'; /*display the "1" as superscripted number"*/
......

ODS PDF TEXT = '#S = {just=center font_size = 0.25cm} New Line';


Procedure titles:

ods proctitle | ptitle | noproctitle | noptitle; /*ptitle is defacult. for all destinations*/


Procedure labels:

ods proclabel 'string'; /*for html, rtf, pdf, and sas results window*/


Other ODS options:

ODS
destination (id = number)
                           
FILE = 'file-specification'
                           
Newfile = starting-point
                          
Columns = n
                          
Startpage = YES | ON | NO | OFF | NEVER | NOW
                           TEXT = 'text-string' (or write to all open destinations ODS TEXT = 'text-string')
                           BODYTITLE_AUX;


ODS style template definition:

ods path work.temp(update) sashelp.tmplmst(read);
proc template;
  define style styles.tx_pdf;
  parent=styles.printer;
    style usertext from usertext /
            font_size = 14pt
            font_weight = bold
            just = c
            outputwidth = 100% ;
  end;
run;

proc template;
  define style styles.tx_rtf;
  parent = styles.rtf;
    style usertext from usertext /
            font_size = 14pt
            font_weight = bold
            just = c
            outputwidth = 100% ;
  end;
run;

ods rtf file = 'file1.rtf' startpage = no style = tx_rtf ;
ods pdf file = 'file2.pdf' startpage=no style = tx_pdf ;

.....
ods _all_ close ;


















[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.