Specifying Titles

To add titles to your output, you can use the TITLE statement.


General form, TITLE statement:
TITLEn 'title-text';    

where n is a number from 1 to 10 that specifies the title line and title-text is the actual title to be displayed.

CAUTION: Be sure to match quotes enclosing the title text.


The PROC PRINT step below contains two TITLE statements, specified for lines 1 and 3.
     proc print data=clinic.stress noobs;
        var resthr maxhr rechr;
        where tolerance='I';
        title1 'Data from Treadmill Tests';
        title3 '1st Quarter Admissions';
     run;

Sample Output

Titles appear at the top of each page of procedure output. The TITLE statement with the largest number appears on the last title line.

In SAS listing output, "skipped" title lines appear blank, as shown in the output below.


Data from Treadmill Tests

1st Quarter Admissions

RestHR MaxHr RecHR 
 
   68       171        133
   78       177   139
   70       167   122
   65       181   141
   74       152   113
   75       158   108
   78       189   138

 

    In HTML output, title lines appear consecutively, without extra spacing for skipped titles.

Data from Treadmill Tests
1st Quarter Admissions

RestHR MaxHR RecHR
68 171 133
78 177 139
70 167 122
65 181 141
74 152 113
75 158 108
78 189 138

Modifying and Canceling Titles
  • Redefining a title line cancels any higher-numbered title lines.

  • To cancel all previous titles, specify a null TITLE statement (a TITLE statement with no number or text).








Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement