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 be sure to match quotation marks that enclose the title or footnote text.

Example: Creating Titles

In the following example, the two TITLE statements are specified for lines 1 and 3. These two TITLE statements define titles for the PROC PRINT output. You can create a blank line between two titles by skipping a number in the TITLE statement.
title1 'Heart Rates for Patients with';
title3 'Increased Stress Tolerance Levels';
proc print data=cert.stress;
  var resthr maxhr rechr;
  where tolerance='I';
run;
Output 6.4 PROC PRINT Output with Titles
PROC PRINT Output with Titles

Example: Creating Footnotes

In the following example, the two FOOTNOTE statements are specified for lines 1 and 3. These two FOOTNOTE statements define footnotes for the PROC PRINT output. Since there is no FOOTNOTE2, a blank line is inserted between FOOTNOTE1 and FOOTNOTE3 in the output.
footnote1 'Data from Treadmill Tests';
footnote3 '1st Quarter Admissions';
proc print data=cert.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.
Output 6.5 PROC PRINT Output with Footnotes
PROC PRINT Output with Footnotes

Modifying and Canceling Titles and Footnotes

As global statements, the TITLE and FOOTNOTE statements remain in effect until you modify the statements, cancel the statements, or end your SAS session. In the following example, the titles and footnotes that are assigned in the PROC PRINT step also appear in the output for the PROC MEANS step.
title1 'Heart Rates for Patients with';
title3 'Increased Stress Tolerance Levels';
footnote1 'Data from Treadmill Tests';
footnote3 '1st Quarter Admissions';
proc print data=cert.stress;
  var resthr maxhr rechr;
  where tolerance='I';
run;
proc means data=cert.stress;
  where tolerance='I';
  var resthr maxhr;
run;
Output 6.6 PROC PRINT Output with Titles and Footnotes
PROC PRINT Output with Titles and Footnotes
Output 6.7 PROC MEANS Output with Titles and Footnotes
PROC MEANS 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.
title1 'Heart Rates for Patients with';
title3 'Participation in Exercise Therapy';
footnote1 'Data from Treadmill Tests';
footnote3 '1st Quarter Admissions';
proc print data=cert.therapy;
  var swim walkjogrun aerclass;
run;
title2 'Report for March';
proc print data=cert.therapy;
run;
Output 6.8 PROC PRINT Output of Cert.Therapy with Title 1 and Title 3 (partial output)
Partial PROC PRINT Output of Cert.Therapy with Title 1 and Title 3
Output 6.9 PROC PRINT Output of Cert.Therapy with Title 1 and Title 2 (partial output)
Partial PROC PRINT Output of Cert.Therapy with Title 1 and Title 2
To cancel all previous titles or footnotes, specify a null TITLE or FOOTNOTE statement. A null TITLE or FOOTNOTE statement does not contain any number or text and cancels all footnotes and titles that are in effect.
title1;                                  /*#1*/
footnote1 'Data from Treadmill Tests';   /*#2*/
footnote3 '1st Quarter Admissions';      
proc print data=cert.stress;
  var resthr maxhr rechr;
  where tolerance='I';
run;
footnote;                                /*#3*/
proc means data=cert.stress;
  where tolerance='I';
  var resthr maxhr;
run;
1 Specifying the TITLE1 statement cancels all previous titles and cancels the default title The SAS System. The PRINT procedure and the MEANS procedure do not contain any titles in the output.
2 Specifying the FOOTNOTE1 and FOOTNOTE3 statements before the PRINT procedure results in footnotes in the PROC PRINT output.
3 Specifying a null FOOTNOTE statement cancels the previously defined footnotes that are in effect.
Output 6.10 PROC PRINT Output with Footnotes and No Titles
PROC PRINT Output with Footnotes and No Titles
Output 6.11 PROC MEANS Output with No Footnotes and No Titles
PROC MEANS Output with No Footnotes and No Titles
Last updated: August 23, 2018
..................Content has been hidden....................

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