Study guide
9.4 Generating CSV, PowerPoint & Other ODS Destinations
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.4 Generating CSV, PowerPoint & Other ODS Destinations
Key Takeaways Explain This Topic AI
The content guide requires HTML, PDF, RTF, XLSX, and PPTX files plus comma-separated value files from ODS statements.
ODS CSV writes procedure output as comma-separated text; ODS CSVALL adds titles, footnotes, and by-line rows that ODS CSV omits.
ODS POWERPOINT produces a native .pptx deck in which each procedure output becomes a slide, and LAYOUT= controls the slide template.
STYLE= applies a style template on any destination opening statement, and STARTPAGE= controls where new pages or slides begin.
ODS CSV is a reporting destination while PROC EXPORT is a data-transfer utility, so ODS CSV honours formats, labels, and titles that PROC EXPORT ignores.
Last updated: August 2026
9.4 Generating CSV, PowerPoint & Other ODS Destinations
Quick Answer: The content guide's ODS objective asks for four things: identify the Output Delivery System destinations, create HTML, PDF, RTF, XLSX, and PPTX files with ODS statements , use the STYLE= option to specify a style template, and generate comma-separated value (CSV) files with ODS statements . HTML, PDF, RTF, and XLSX are covered in the preceding sections; this section closes out CSV and PPTX and the options that apply across every destination.
1. ODS CSV: Procedure Output as Comma-Separated Text ods csv file="C:\reports\region_summary.csv";
- proc means data=sashelp.shoes mean sum maxdec=2;
- class Region;
- var Sales;
- run;
ods csv close;
ODS CSV takes the rendered report — the same table PROC MEANS would print — and writes it as comma-separated text. Because it is a reporting destination rather than a data-transfer utility, it honours everything the report honours: column labels, applied formats, computed statistic columns, and the column order the procedure chose.
ODS CSV versus ODS CSVALL
- Destination What it writes
- ODS CSV The table only — the column headings row plus data rows
ODS CSVALL The table plus titles, footnotes, by-lines, and blank separator rows ods csvall file="C:\reports\annotated_summary.csv";
- title "Regional Sales Summary";
- footnote "Source: SASHELP.SHOES";
- proc means data=sashelp.shoes mean sum maxdec=2;
- class Region;
- var Sales;
- run;
- ods csvall close;
- footnote;
Use CSV when another program will parse the file, because leading title rows break most parsers. Use CSVALL when a human will open it and needs the context.
Two Ways to Get a CSV, and When Each Is Right
- Requirement Correct tool
- A CSV of a procedure's report , with labels, formats, and computed statistics ODS CSV
- A CSV of a data set's raw rows , one row per observation PROC EXPORT ... DBMS=CSV
- A CSV whose exact layout you control line by line DATA _NULL_ with FILE and PUT
- Exam Trap: ODS CSV writes what the procedure displayed . Point it at a PROC MEANS step and you get the
- summary statistics, not the underlying observations. When a question asks for a comma-delimited copy of a data
set, PROC EXPORT is the answer; when it asks for a comma-delimited copy of a report , ODS CSV is.
- 2. ODS POWERPOINT: Native .pptx Decks ods powerpoint file="C:\reports\quarterly_review.pptx"
- style=PowerPointLight;
- title "Q1 Sales by Region";
- proc means data=sashelp.shoes mean sum maxdec=2;
- class Region;
- var Sales;
- run;
- title "Q1 Product Mix";
- proc freq data=sashelp.shoes;
- tables Product / nocum;
- run;
ods powerpoint close;
Each procedure output becomes a slide , with the active TITLE used as the slide title. The result is a genuine OpenXML .pptx file that opens natively in PowerPoint — no image capture, no manual pasting.
- Controlling Slide Layout ods powerpoint file="C:\reports\deck.pptx"
- layout=titleandcontent
- style=PowerPointDark;
- LAYOUT= value Slide template produced
- TITLEANDCONTENT (default) Title bar plus a single content region
- TITLEONLY Title bar only, useful for section dividers
- CONTENT Content region with no title bar
- TWOCONTENT Two side-by-side content regions
STARTPAGE= behaves on ODS POWERPOINT the way it does on ODS PDF : STARTPAGE=NO keeps consecutive procedure outputs on the same slide, and STARTPAGE=NOW forces a break immediately. ods powerpoint file="C:\reports\compact.pptx" startpage=no;
- proc print data=sashelp.class(obs=5) noobs; run;
- proc means data=sashelp.class mean; var Height; run; /* same slide */
- ods powerpoint close;
- 3. Style Templates Apply Everywhere
STYLE= is accepted on the opening statement of essentially every destination, so one option controls fonts, colours, borders, and cell padding across the whole document. ods pdf file="report.pdf" style=Pearl;
- ods rtf file="report.rtf" style=Journal;
- ods excel file="report.xlsx" style=Excel;
- ods powerpoint file="report.pptx" style=PowerPointDark;
- ods csv file="report.csv"; /* CSV is plain text - STYLE= has no visual effect */
ODS CSV accepts the option without complaint but produces plain text, so a style template has nothing to act on. That asymmetry is a favourite distractor.
4. Opening Several Destinations at Once
ODS routes each output object to every open destination simultaneously. One execution of a procedure can therefore populate four files. ods listing close; /* skip redundant text rendering */
- ods pdf file="C:\out\summary.pdf" style=Pearl;
- ods excel file="C:\out\summary.xlsx" style=Excel;
- ods powerpoint file="C:\out\summary.pptx" style=PowerPointLight;
- ods csv file="C:\out\summary.csv";
- title "Regional Sales Summary";
- proc means data=sashelp.shoes mean sum maxdec=2;
- class Region;
- var Sales;
- run;
- ods _all_ close; /* closes every open destination in one statement */
- ods listing; /* restore the default for interactive work */
ODS _ALL_ CLOSE; is the safety net at the end of a batch program: it releases every file lock without your having to remember which destinations were opened.
5. Destination Summary
- Destination File produced Honours styles? Typical use
- ODS HTML .html Yes Web and screen viewing
- ODS PDF .pdf Yes Printing, archiving, distribution
- ODS RTF .rtf Yes Editable Microsoft Word documents
- ODS EXCEL .xlsx Yes Formatted multi-tab spreadsheets
- ODS POWERPOINT .pptx Yes Slide decks, one slide per output object
- ODS CSV / CSVALL .csv No Machine-readable comma-delimited report text
- ODS LISTING Text No Legacy monospaced output
- ODS OUTPUT SAS data set n/a Capturing any output object as data