Study guide

9.5 Customizing ODS Titles, Footnotes, & Global Options

SAS Certified Specialist: Base Programming Using SAS 9.4 A00-231

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: SAS Base Programming Exam Overview

1.1 A00-231 Exam Format, Scoring & Test-Day Logistics 1.2 Official Content Areas, Weights & Study Plan

2 Chapter 2: Accessing & Creating SAS Data Structures

2.1 SAS Environment, Syntax Rules, & Data Step Basics 2.2 SAS Data Libraries & the LIBNAME Statement 2.3 Investigating Libraries with PROC CONTENTS & PROC DATASETS 2.4 Importing Delimited & Excel Data with PROC IMPORT 2.5 Raw Data Ingestion with INFILE and INPUT Statements

3 Chapter 3: Managing & Combining SAS Data Sets

3.1 Reading SAS Data Sets with the SET Statement 3.2 Combining Data Sets: Concatenating & Interleaving 3.3 Match-Merging with BY Statements & FIRST./LAST. Processing 3.4 Controlling Data Output & Variable Selection (KEEP, DROP, RENAME, OBS=)

4 Chapter 4: Data Transformation & Conditional Logic

4.1 Creating & Modifying Variables with Assignment Statements 4.2 Modifying Variable Attributes with LENGTH, LABEL, FORMAT & RENAME= 4.3 Conditional Processing: IF-THEN/ELSE Statements & WHERE Subsetting 4.4 Accumulating Totals & Subtotals (RETAIN & Sum Statement) 4.5 Processing Data Iteratively with DO Loops

5 Chapter 5: SAS Functions & Data Type Conversions

5.1 Character Functions for String Manipulation 5.2 Numeric & Mathematical Functions 5.3 Working with SAS Dates, Times, & Intervals 5.4 Reading & Displaying Dates with Informats and Formats 5.5 Explicit & Implicit Data Type Conversions (INPUT & PUT)

6 Chapter 6: Restructuring Data & Program Maintenance

6.1 SAS Array Processing for Multi-Variable Transformations 6.2 Sorting Data Sets with PROC SORT 6.3 Restructuring Data Sets with PROC TRANSPOSE 6.4 Creating & Applying Custom Formats with PROC FORMAT 6.5 Simplifying Programs with Macro Variables (%LET)

7 Chapter 7: Error Handling & Debugging SAS Programs

7.1 SAS Log Analysis & Diagnostic Messages 7.2 Syntax vs. Logic Errors & Phasing 7.3 Debugging Techniques with _ERROR_, _N_, & PUT Statements 7.4 Identifying Logic Errors with the PUTLOG Statement 7.5 Handling Missing Values & Preventing Calculation Propagations

8 Chapter 8: Summary & Detail Data Reporting

8.1 Detail Reporting with PROC PRINT 8.2 Descriptive Statistics with PROC MEANS & PROC SUMMARY 8.3 Frequency & Categorical Analysis with PROC FREQ 8.4 Screening Extreme & Missing Values with PROC UNIVARIATE 8.5 Custom Tabular Reports with PROC REPORT & PROC TABULATE

9 Chapter 9: ODS Output Delivery & Data Export

9.1 Output Delivery System (ODS) Architecture Basics 9.2 Generating PDF, HTML, & RTF Output Destinations 9.3 Exporting Reports to Excel with ODS EXCEL & XLSX 9.4 Generating CSV, PowerPoint & Other ODS Destinations 9.5 Customizing ODS Titles, Footnotes, & Global Options 9.6 Exporting SAS Data Sets with PROC EXPORT & the XLSX Engine

9.5 Customizing ODS Titles, Footnotes, & Global Options

Key Takeaways Explain This Topic AI

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 n 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 n n , SAS automatically cancels all existing titles numbered greater than n n 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 Type Example Displayed 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 Option Syntax / Range Default Purpose & Description

CENTER / NOCENTER OPTIONS NOCENTER; CENTER Controls horizontal alignment of titles and procedure output. NOCENTER left-aligns output.

DATE / NODATE OPTIONS NODATE; DATE Toggles display of session date/time stamps in output headers.

NUMBER / NONUMBER OPTIONS NONUMBER; NUMBER Toggles display of automatic page numbers in output headers.

PAGENO= OPTIONS PAGENO=1; 1 Resets or sets the starting page number for subsequent procedure output.

LINESIZE= (LS=) OPTIONS LS=80; (64-256) Varies Sets maximum character line width for output.

PAGESIZE= (PS=) OPTIONS PS=60; (15-500) Varies Sets 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:

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= .

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 .