9.5 Customizing ODS Titles, Footnotes, & Global Options

Key Takeaways

  • SAS supports up to 10 active TITLE statements (TITLE1 through TITLE10) and 10 active FOOTNOTE statements (FOOTNOTE1 through FOOTNOTE10).
  • Defining a lower-numbered title statement (e.g., TITLE2 'Text';) automatically cancels and clears all higher-numbered titles (TITLE3 through TITLE10).
  • Issuing a blank TITLE; or TITLE1; statement clears all active titles; similarly, FOOTNOTE; or FOOTNOTE1; clears all active footnotes.
  • Macro variable references embedded inside titles or footnotes (e.g., &SYSDATE) require double quotation marks ("...") to resolve properly; single quotes preserve text literally.
  • Global SAS system options (OPTIONS NOCENTER LS= PS= PAGENO= DATE NUMBER) alter global environment settings, though specific ODS destinations may override fixed page layout options.
Last updated: August 2026

9.5 Customizing ODS Titles, Footnotes, & Global Options

Report presentation relies heavily on clear headings, page numbers, execution timestamps, and consistent layout formatting. SAS provides global TITLE and FOOTNOTE statements alongside environment system options (OPTIONS) to manage default output aesthetics across both traditional LISTING and modern ODS destinations.


TITLEn and FOOTNOTEn Statements

SAS permits up to 10 lines of titles and 10 lines of footnotes at any given point in a SAS session.

Basic Syntax

TITLE<n> "text-in-quotes";
FOOTNOTE<n> "text-in-quotes";

(where $n$ is an integer from 1 to 10; TITLE without a number is equivalent to TITLE1).

title1 "Acme Corporation";
title2 "Quarterly Financial Analysis";
title3 "Department of Sales";

footnote1 "Confidential - Internal Distribution Only";
footnote2 "Generated on &SYSDATE";

Scoping, Replacement, and Clearing Rules

Titles and footnotes are global statements. Once defined, they remain active for all subsequent procedure output until explicitly modified or canceled.

Rule 1: Higher-Numbered Title Cancellation

When you redefine a title at level $n$, SAS automatically cancels all existing titles numbered greater than $n$.

Step-by-Step Example

/* Initial Setup */
title1 "Main Header";
title2 "Sub Header 2";
title3 "Sub Header 3";
title4 "Sub Header 4";

/* Procedure 1 displays Titles 1, 2, 3, 4 */
proc print data=sashelp.class; run;

/* Redefine Title 2 */
title2 "NEW Sub Header 2";

/* Procedure 2 displays ONLY Title 1 and NEW Title 2!
   Title 3 and Title 4 were automatically canceled! */
proc print data=sashelp.class; run;

Rule 2: Clearing All Active Titles or Footnotes

To clear all currently active titles or footnotes, issue a blank statement without text:

/* Clears ALL titles (TITLE1 through TITLE10) */
title;
/* OR */
title1;

/* Clears ALL footnotes (FOOTNOTE1 through FOOTNOTE10) */
footnote;
/* OR */
footnote1;

[!IMPORTANT] To clear a specific title line without clearing higher lines, you must redefine it as a blank string in quotes (e.g., TITLE3 "";). Issuing TITLE3; without quotes will cancel Title 3 and all higher titles (Titles 4-10).


Macro Variable Resolution in Titles and Footnotes

Titles and footnotes frequently display dynamic information, such as current execution dates, user IDs, or macro parameters.

To ensure that SAS macro variables (such as &SYSDATE, &SYSDAY, or custom macro variables) resolve to their underlying values, you MUST enclose the title text in double quotation marks ("...").

%let ReportDept = Finance;

/* CORRECT: Double quotes allow macro resolution */
title1 "Department Report: &ReportDept";
title2 "Report Date: &SYSDATE";

/* INCORRECT: Single quotes prevent macro resolution */
title3 'Department Report: &ReportDept'; 
/* Displays literally as: Department Report: &ReportDept */
Quote TypeExampleDisplayed Result in ODS Report
Double Quotes (")title "Date: &SYSDATE";Date: 07AUG26 (Resolved)
Single Quotes (')title 'Date: &SYSDATE';Date: &SYSDATE (Literal text)

Global System OPTIONS for Output Formatting

Global SAS OPTIONS statements control session-wide environment parameters. While ODS visual styles override many legacy text options, several key system options remain critical for certification and report formatting.

Key Report System Options Table

System OptionSyntax / RangeDefaultPurpose & Description
CENTER / NOCENTEROPTIONS NOCENTER;CENTERControls horizontal alignment of titles and procedure output. NOCENTER left-aligns output.
DATE / NODATEOPTIONS NODATE;DATEToggles display of session date/time stamps in output headers.
NUMBER / NONUMBEROPTIONS NONUMBER;NUMBERToggles display of automatic page numbers in output headers.
PAGENO=OPTIONS PAGENO=1;1Resets or sets the starting page number for subsequent procedure output.
LINESIZE= (LS=)OPTIONS LS=80; (64-256)VariesSets maximum character line width for output.
PAGESIZE= (PS=)OPTIONS PS=60; (15-500)VariesSets maximum lines per page for text output.

Code Example: Combining System Options and ODS

/* Configure global environment options */
options nocenter nodate pageno=1 ls=100 ps=50;

ods pdf file="C:\reports\CustomFormatted.pdf" style=Pearl;

title1 "Executive Summary";
title2 "Generated for &SYSUSERID on &SYSDATE";
footnote1 "Page ~{thispage}";

proc report data=sashelp.prdsale;
   column Region Product Sales;
   define Region / group;
run;

ods pdf close;

ODS Interaction with Global System Options

It is important to recognize how different ODS destinations interact with global SAS system options:

  1. Paged Destinations (ODS PDF, ODS RTF, ODS PRINTER): Respect PAGENO=, DATE, NUMBER, and title/footnote definitions. Page size is primarily controlled by physical page margins and PAPERSIZE= options rather than character PAGESIZE=.
  2. Unpaged Destinations (ODS HTML, ODS EXCEL): Ignore fixed page height options (PAGESIZE=) because web pages and spreadsheets scroll continuously. However, they respect TITLE, FOOTNOTE, and alignment settings like NOCENTER.
Test Your Knowledge

Consider the following SAS code executed in sequence:

title1 "Company Sales";
title2 "North America Region";
title3 "Q4 Report";
proc print data=sales; run;

title2 "Global Operations";
proc print data=sales; run;
Which titles appear on the output of the second PROC PRINT step?

A
B
C
D
Test Your Knowledge

A programmer wants to display the dynamic macro variable value &SYSDATE in Title 1 and left-align the procedure output across the report. Which SAS statements achieve this?

A
B
C
D
Test Your Knowledge

How can a programmer clear all currently active titles and footnotes in a SAS session?

A
B
C
D
Test Your Knowledge

Which global SAS system option is used to reset the page numbering of subsequent procedure output to start at page 1?

A
B
C
D