Previous Page | Next Page

Dictionary of ODS Language Statements

ODS TEXT= Statement



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.

Syntax
Required Arguments
Examples
Example 1: Adding Text to Multiple Destinations

Syntax

ODS TEXT= 'text-string'


Required Arguments

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.

Examples


Example 1: Adding Text to Multiple Destinations

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:

PROC PRINT

Data set:

Exprev.


Program Description

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.


Program

options obs=10;

 Note about code
proc template;
   define style mystyle;
   parent=styles.default;
   style usertext from usertext /
      foreground=red;
   end;
run;
 Note about code
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
ods text="My Text 1";   
ods text="My Text 2"; 
 Note about code
title "January Orders ";
footnote " For All Employees9";
 Note about code
proc print data=exprev;
run;
 Note about code
ods text="My Text 3";   
 Note about code
ods _all_ close;

title;
footnote;
 Note about code
proc template;
   delete mystyle;
   run;

Output

HTML Output with Text Added

[HTML Output with Text Added]

PDF Output with Text Added

[PDF Output with Text Added]

Traditional RTF Output with Text Added

[Traditional RTF Output with Text Added]

Previous Page | Next Page | Top of Page