Dictionary of ODS Language Statements |
Inserts text into your ODS
output.
Valid in: |
anywhere
|
Category: |
ODS: Output Control
|
Tip: |
The ODS TEXT= statement is sent only to output destinations
that are open. Therefore, it must be specified after an ODS destination statement.
|
- text-string
-
specifies the text to insert into your output. This text
is sent to all open supported output destinations.
Restriction: |
The ODS TEXT= statement does not
support the OUTPUT destination or the LISTING destination. All other ODS destinations
are supported. |
Requirement: |
You must enclose 'text-string' in parentheses. |
Tip: |
The UserText style element controls text
specified with the TEXT= statement. |
- ODS features:
-
|
ODS HTML statement |
|
ODS PDF statement |
|
ODS RTF statement |
|
ODS TEXT=
statement |
|
PROC TEMPLATE:
|
DEFINE STYLE statement |
|
PARENT= statement |
|
STYLE
statement | |
- Other SAS features:
-
- Data set:
-
Exprev.
The following example
uses a single ODS TEXT= statement to add text to PDF, HTML, and traditional
RTF output. PROC TEMPLATE modifies the UserText style element which controls
the font style, font color, and other attributes of the text that the ODS
TEXT= statement adds.
options obs=10;
![Note about code](../../../../common/61991/HTML/default/images/snbut.gif) |
proc template;
define style mystyle;
parent=styles.default;
style usertext from usertext /
foreground=red;
end;
run; |
![Note about code](../../../../common/61991/HTML/default/images/snbut.gif) |
ods html file="text.html" style=mystyle;
ods pdf file="text.pdf" startpage=never notoc style=mystyle;
ods rtf file="text_trad.rtf" style=mystyle; |
![Note about code](../../../../common/61991/HTML/default/images/snbut.gif) |
ods text="My Text 1";
ods text="My Text 2"; |
![Note about code](../../../../common/61991/HTML/default/images/snbut.gif) |
title "January Orders ";
footnote " For All Employees9"; |
![Note about code](../../../../common/61991/HTML/default/images/snbut.gif) |
proc print data=exprev;
run; |
![Note about code](../../../../common/61991/HTML/default/images/snbut.gif) |
ods text="My Text 3"; |
![Note about code](../../../../common/61991/HTML/default/images/snbut.gif) |
ods _all_ close;
title;
footnote; |
![Note about code](../../../../common/61991/HTML/default/images/snbut.gif) |
proc template;
delete mystyle;
run; |
HTML Output with Text Added
![[HTML Output with Text Added]](images/textstmnthtml.gif)
PDF Output with Text Added
![[PDF Output with Text Added]](images/textstmntpdf.gif)
Traditional RTF Output with Text Added
![[Traditional RTF Output with Text Added]](images/textstmntrtftrad.gif)
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.