Specifying Titles and Footnotes in Procedure Output

TITLE and FOOTNOTE Statements

To make your report more meaningful and self-explanatory, you can assign up to 10 titles with procedure output by using TITLE statements before the PROC step. Likewise, you can specify up to 10 footnotes by using FOOTNOTE statements before the PROC step.
Tip
Because TITLE and FOOTNOTE statements are global statements, place them anywhere within or before the PRINT procedure. Titles and footnotes are assigned as soon as TITLE or FOOTNOTE statements are read; they apply to all subsequent output.
Syntax, TITLE, and FOOTNOTE statements:
TITLE<n> 'text';
FOOTNOTE<n> 'text';
n is a number from 1 to 10 that specifies the title or footnote line, and 'text' is the actual title or footnote to be displayed. The maximum title or footnote length depends on your operating environment and on the value of the LINESIZE= option.
The keyword TITLE is equivalent to title1. Likewise, FOOTNOTE is equivalent to footnote1. If you do not specify a title, the default title is The SAS System. No footnote is printed unless you specify one.
As a best practice make sure to match quotation marks that enclose the title or footnote text.

Using the TITLES and FOOTNOTES Windows

You can also specify titles in the TITLES window and footnotes in the FOOTNOTES window. Titles and footnotes that you specify in these windows are not stored with your program, and they remain in effect only during your SAS session.
To open the TITLES window, issue the TITLES command in the command bar. To open the FOOTNOTES window, issue the FOOTNOTES command in the command bar.
To specify a title or footnote, enter the text that you want next to the number of the line where the text should appear. To cancel a title or footnote, delete the existing text. Notice that you do not enclose text in quotation marks in these windows.
Figure 5.19 Titles Window
Titles Window

Example: Creating Titles

The two TITLE statements below, specified for lines 1 and 3, define titles for the PROC PRINT output.
title1 'Heart Rates for Patients with'; 
title3 'Increased Stress Tolerance Levels'; 
proc print data=clinic.stress; 
   var resthr maxhr rechr; 
   where tolerance='I'; 
run;
Figure 5.20 HTML Output with Titles: SASĀ®9
HTML Output with Titles: SAS 9
In SAS LISTING output for all versions of SAS, title line 2 is blank, as shown below. Titles are centered by default.
Figure 5.21 LISTING Output with Titles: All Versions
LISTING Output with Titles: All Versions

Example: Creating Footnotes

The two FOOTNOTE statements below, specified for lines 1 and 3, define footnotes for the PROC PRINT output. Since there is no footnote2, a blank line is inserted between footnotes 1 and 2 in the output.
footnote1 'Data from Treadmill Tests'; 
footnote3 '1st Quarter Admissions'; 
proc print data=clinic.stress; 
   var resthr maxhr rechr; 
   where tolerance='I'; 
run;
Footnotes appear at the bottom of each page of procedure output. Notice that footnote lines are pushed up from the bottom. The FOOTNOTE statement that has the largest number appears on the bottom line.
Figure 5.22 HTML Output with Footnotes
HTML Output with Footnotes
In SAS LISTING output, footnote line 2 is blank, as shown below. Footnotes are centered by default.
Figure 5.23 LISTING Output with Footnotes
LISTING Output with Footnotes

Modifying and Canceling Titles and Footnotes

TITLE and FOOTNOTE statements are global statements. That is, after you define a title or footnote, it remains in effect until you modify it, cancel it, or end your SAS session.
For example, the footnotes that are assigned in the PROC PRINT step below also appear in the output from the PROC TABULATE step.
footnote1 'Data from Treadmill Tests'; 
footnote3 '1st Quarter Admissions'; 
proc print data=clinic.stress; 
   var resthr maxhr rechr; 
   where tolerance='I'; 
run; 
proc tabulate data=clinic.stress;
   where tolerance='I'; 
   var resthr maxhr; 
   table mean*(resthr maxhr); 
run;
Output 5.1 HTML Output with Titles and Footnotes
HTML Output with Titles and Footnotes
Redefining a title or footnote line cancels any higher-numbered title or footnote lines, respectively. In the example below, defining a title for line 2 in the second report automatically cancels title line 3.
title3 'Participation in Exercise Therapy'; 
proc print data=clinic.therapy; 
   var swim walkjogrun aerclass; 
run; 
title2 'Report for March'; 
proc print data=clinic.therapy; 
run;
Output 5.2 HTML Output with Titles and Footnotes
HTML Output with Titles and Footnotes (partial output)
HTML Output with Titles and Footnotes
To cancel all previous titles or footnotes, specify a null TITLE or FOOTNOTE statement (a TITLE or FOOTNOTE statement with no number or text) or a TITLE1 or FOOTNOTE1 statement with no text. This action cancels the default title The SAS System.
For example, in the program below, the null TITLE1 statement cancels all titles that are in effect before either PROC step executes. The null FOOTNOTE statement cancels all footnotes that are in effect after the PROC PRINT step executes. The PROC TABULATE output appears without a title or a footnote.
title1; 
footnote1 'Data from Treadmill Tests'; 
footnote3 '1st Quarter Admissions'; 
proc print data=clinic.stress; 
   var resthr maxhr rechr; 
   where tolerance='I'; 
run; 
footnote; 
proc tabulate data=clinic.stress; 
   var timemin timesec; 
   table max*(timemin timesec); 
run;
Output 5.3 HTML Output with No Titles
HTML Output with No Titles
Last updated: January 10, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.255.36