SAS出力に使用するタイトルを指定します。
該当要素: | 任意の場所 |
カテゴリ: | 出力制御 |
参照項目: | XisError: No pubcode in link data found for hostwin、XisError: No pubcode in link data found for hostunx、またはXisError: No pubcode in link data found for hosto390のTITLEステートメント |
タイトルを表示する相対行番号を指定します。
範囲 | 1-10 |
ヒント | 番号が最大のタイトル行は、一番下の行に表示されます。nの指定を省略すると、この値は1と見なされます。そのため、最初のタイトル行にはTITLEまたはTITLE1を指定できます。 |
テキスト行の行間にブランク行を追加したタイトルを作成できます。たとえば、TITLEステートメントおよびTITLE3ステートメントを使用してテキストを指定すると、この2行のテキストの間にブランク行が1行表示されます。 |
ODS HTML、RTF、およびPRINTERの各出力先に対して出力形式オプションを指定します。
タイトルテキストを太字で表示するように指定します。
ODS出力先 | HTML、RTF、PRINTER |
タイトルテキストの色を指定します。
別名 | C |
ODS出力先 | HTML、RTF、PRINTER |
例 | ODS (Output Delivery System)を使用したタイトルとフットノートのカスタマイズ |
タイトル表示部分の背景色を指定します。
ODS出力先 | HTML、RTF、PRINTER |
使用するフォントを指定します。複数のフォントを指定した場合、出力先デバイスはシステムにインストールされている最初のフォントを使用します。
別名 | F |
ODS出力先 | HTML、RTF、PRINTER |
タイトルのフォントのサイズを指定します。
は正の数になります。
cm | センチメートル |
em | タイプセッティングにおいての幅の標準測定単位 |
ex | タイプセッティングにおいての高さの標準測定単位 |
in | インチ |
mm | ミリメートル |
pt | (プリンタの)ポイント |
制限事項 | dimensionを指定する場合は、測定単位も指定してください。測定単位なしでは、数字は相対的なサイズになります。 |
sizeの値は、HTML文書のその他すべてののフォントサイズに対して相対的です。
範囲 | 1から7 |
別名 | H |
ODS出力先 | HTML、RTF、PRINTER |
例 | ODS (Output Delivery System)を使用したタイトルとフットノートのカスタマイズ |
タイトルテキストをイタリック体で表示するように指定します。
ODS出力先 | HTML、RTF、PRINTER |
配置する位置を指定します。
中央揃えで表示するように指定します。
別名 | C |
左寄せで表示するように指定します。
別名 | L |
右寄せで表示するように指定します。
別名 | R |
別名 | J |
ODS出力先 | HTML、RTF、PRINTER |
例 | ODS (Output Delivery System)を使用したタイトルとフットノートのカスタマイズ |
ハイパーリンクを指定します。
ODS出力先 | HTML、RTF、PRINTER |
ヒント | LINK=の表示プロパティは、常に現在のスタイルから取得します。 |
後ろに指定するテキストに下線を表示するかどうかを指定します。0を指定すると下線は表示されません。1、2、3を指定すると下線が表示されます。
別名 | U |
ODS出力先 | HTML、RTF、PRINTER |
ヒント | ODSでは値1、2、3に対して同じ種類の下線が生成されます。SAS/GRAPHでは、値1、2、3に従って生成される下線の幅が徐々に太くなります。 |
注 | デフォルトでは、ODSでのTITLEステートメントの表示設定は、現在のスタイルのシステムタイトルに関連するスタイル要素から取得します。TITLEステートメントの構文でods-format-optionsを指定すると、現在のスタイルから提供される設定より優先されます。現在のスタイルは、ODS出力先によって異なります。現在のスタイルを特定する方法の詳細については、XisError: No pubcode in link data found for odsprocを参照してください。また、XisError: No pubcode in link data found for odsprocを参照してください。 |
ヒント | これらのオプションを文字、1単語、複数単語ごとに指定することができます。オプションに続けて、textにそれぞれの文字や単語を指定します。 |
たとえば、次のコードでは、タイトルテキスト“Red, White, and Blue”が異なる色で表示されます。 title color=red "Red," color=white "White, and" color=blue "Blue"; |
一重引用符または二重引用符で囲んだテキストを指定します。
テキスト文字列に指定した#BYVALをBY変数の現在の値に置き換えて、タイトルに表示します。
#BYVALにBYステートメントのどの変数を使用するかを指定します。nの値は、BYステートメントの変数の位置を示します。
例 | #BYVAL2 では、BYステートメントの2番目の変数を指定します。
|
BY変数の名前を指定します。
ヒント | variable-nameでは、大文字と小文字は区別されません。 |
例 | #BYVAL(YEAR) では、BY変数YEARを指定します。
|
テキスト文字列に指定した#BYVARをBY変数の名前または変数に関連付けられているラベルで置き換え、タイトルに名前またはラベルを表示します。
#BYVARにBYステートメントのどの変数を使用するかを指定します。nの値は、BYステートメントの変数の位置を示します。
例 | #BYVAR2 では、BYステートメントの2番目の変数を指定します。
|
BY変数の名前を指定します。
ヒント | variable-nameでは、大文字と小文字は区別されません。 |
例 | #BYVAR(SITES) では、BY変数SITESを指定します。
|
テキスト文字列に指定した#BYLINEを先頭と末尾にブランクを含まないBY行全体で置き換えて、タイトルに表示します。
ヒント | #BYLINEを指定すると、OPTIONSステートメントにNOBYLINEを指定して出力を抑制しない限り、ページ上部にBY行を含む出力が生成されます。 |
参照項目 | NOBYLINEの詳細については、XisError: No pubcode in link data found for lesysoptsrefを参照してください。 |
ヒント | 以前のリリースとの互換性を保つため、引用符で囲まれていない一部のテキストが受け入れられます。新しいプログラムを作成したり、既存のプログラムを更新する場合は、指定するテキストを常に引用符で囲むようにしてください。 |
マクロやマクロ変数を使用すると、TITLEステートメント内の情報を変更できます。タイトルが二重引用符("")で囲まれている場合、そのテキストはタイトルに置き換えられます。タイトルが一重引用符('')で囲まれている場合、テキストは置き換えられません。 | |
マクロやマクロ変数を使用すると、TITLEステートメント内の情報を変更できます。SASマクロ機能が、このマクロ変数を解決します。 | |
参照項目 | タイトルの一部に引用符を使用する方法の詳細については、XisError: No pubcode in link data found for lrconを参照してください。 |
titlen;
title 'First Draft';
title2 "Year's End Report";
title2 'Year''s End Report';
title 'Quarterly Sales for #byval(site)';
title 'Annual Costs for #byvar2';
title 'Data Group #byline';
/********************************************* *The following program creates the data set * *grain_production and the $cntry format. * *********************************************/ data grain_production; length Country $ 3 Type $ 5; input Year country $ type $ Kilotons; datalines; 1995 BRZ Wheat 1516 1995 BRZ Rice 11236 1995 BRZ Corn 36276 1995 CHN Wheat 102207 1995 CHN Rice 185226 1995 CHN Corn 112331 1995 IND Wheat 63007 1995 IND Rice 122372 1995 IND Corn 9800 1995 INS Wheat . 1995 INS Rice 49860 1995 INS Corn 8223 1995 USA Wheat 59494 1995 USA Rice 7888 1995 USA Corn 187300 2010 BRZ Wheat 3302 2010 BRZ Rice 10035 2010 BRZ Corn 31975 2010 CHN Wheat 109000 2010 CHN Rice 190100 2010 CHN Corn 119350 2010 IND Wheat 62620 2010 IND Rice 120012 2010 IND Corn 8660 2010 INS Wheat . 2010 INS Rice 51165 2010 INS Corn 8925 2010 USA Wheat 62099 2010 USA Rice 7771 2010 USA Corn 236064 ; run; proc format; value $cntry 'BRZ'='Brazil' 'CHN'='China' 'IND'='India' 'INS'='Indonesia' 'USA'='United States'; run;
/***************************************** *This PROC TEMPLATE step creates the * *table definition TABLE1 that is used * *in the DATA step. * *****************************************/ proc template; define table table1; mvar sysdate9; dynamic colhd; classlevels=on; define column char_var; generic=on; blank_dups=on; header=colhd; style=cellcontents; end; define column num_var; generic=on; header=colhd; style=cellcontents; end; define footer table_footer; end; end; run;
/*********************************************************************** *The ODS HTML statement creates HTML output created with * *the style defintion D3D. * * * *The TITLE statement specifies the text for the first title * *and the attributes that ODS uses to modify it. * *The J= style attribute left-justifies the title. * *The COLOR= style attributes change the color of the title text * *"Leading Grain" to blue and "Producers in" to green. * * * *The TITLE2 statement specifies the text for the second title * *and the attributes that ODS uses to modify it. * *The J= style attribute center justifies the title. * *The COLOR= attribute changes the color of the title text "2010" * *to red. * * The HEIGHT= attributes change the size of each * *individual number in "2010". * * * *The FOOTNOTE statement specifies the text for the first footnote * *and the attributes that ODS uses to modify it. * *The J=left style attribute left-justifies the footnote. * *The HEIGHT=20 style attribute changes the font size to 20pt. * *The COLOR= style attributes change the color of the footnote text * *"Prepared" to red and "on" to green. * * * *The FOOTNOTE2 statement specifies the text for the second footnote * *and the attributes that ODS uses to modify it. * *The J= style attribute centers the footnote. * *The COLOR= attribute changes the color of the date * *to blue, * *The HEIGHT= attribute changes the font size * *of the date specified by the sysdate9 macro. * ***********************************************************************/ ods html body='newstyle-body.htm' style=d3d; title j=left font= 'Times New Roman' color=blue bcolor=red "Leading Grain " c=green bold italic "Producers in"; title2 j=center color=red underlin=1 height=28pt "2" height=24pt "0" height=20pt "1" height=16pt "0"; footnote j=left height=20pt color=red "Prepared " c='#FF9900' "on"; footnote2 j=center color=blue height=24pt "&sysdate9"; footnote3 link='http://support.sas.com' "SAS"; /*********************************************************** *This step uses the DATA step and ODS to produce * *an HTML report. It uses the default table definition * *(template) for the DATA step and writes an output object * *to the HTML destination. * ***********************************************************/ data _null_; set grain_production; where type in ('Rice', 'Corn') and year=1996; file print ods=( template='table1' columns=( char_var=country(generic=on format=$cntry. dynamic=(colhd='Country')) char_var=type(generic dynamic=(colhd='Year')) num_var=kilotons(generic=on format=comma12. dynamic=(colhd='Kilotons')) ) ); put _ods_; run;