Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

in the table of contents.

* Run the Contents Procedure;


proc contents data=sashelp.class; run;
ods proctitle; or ods noproctitle;
Specifies whether or not the procedure title should * Close all ODS destinations; This tip sheet placesODS
frequently used
be printed. ODS
ODSods
ODSTip
Tip
Tip Sheet
Sheet
Sheet
_all_ close;
information in one place, on one sheet of
ODS Tip Sheet
* Re-open the listing destination; paper, so you don’t have to search through the
ods select selection(s); ods listing; online documentation. It also gives you
Output
ods exclude Output Destination
Destination
selections(s); Example
Example Column
Column forfor logo,
logo, address,
address, and
and trademark
trademark info
info
Output
Specifies the output Destination
objects to show or exclude from Example Column for logo, address, and trademark info something to take home, type in, and try.
Basic
Basic Usage
Usage
the report, respectively. * *Open
Openseveral
severalODS ODSdestinations;
destinations;
Basic Usage ods
odshtml
* htmlframe="report.html"
Open frame="report.html"
several ODS destinations; ODS allows you to format your reports in
ods outputoutput-object-name=data-set-name;
show; output-object-name=data-set-name; file="reportb.html"
ods htmlfile="reportb.html"
frame="report.html" various formats such as HTML, PDF, Microsoft
ODS:
ODS:
ods
odsoutput
contents="reportc.html"
contents="reportc.html"
file="reportb.html"
……procedure
procedure
code
code
… …output-object-name=data-set-name; Word, Microsoft Excel, and many others. It
ODS:
ods output
Displays current select and exclude lists. style=styles.analysis;
style=styles.analysis;
contents="reportc.html"
QuickTime™ and a
ods …output
procedure
odsoutput code …
close;
close;
ods output close;
ods
odspdf TIFF (LZW) decompressor
pdffile="report.pdf"
file="report.pdf"
style=styles.analysis;notoc;
notoc;
are needed to see this picture. enables you to customize your reports by

Output
OutputDelivery
Delivery
ods trace on; ods
odsword
word
ods file="report.docx";
file="report.docx";
pdf file="report.pdf" notoc; selecting only the results you want to see. It
Use
Useods trace
ods traceon;
on;toto
determine
determine
thethe
output
output
object
object
Output Delivery
ods
odsexcel
excelfile="report.xlsx";
file="report.xlsx";
Displays information about output objects as they ods word file="report.docx";
even lets you apply styles to your reports
names.Use ods trace on; to determine the output object
names. ods
odsoutput
output
ods variables=work.vardata;
excelvariables=work.vardata;
file="report.xlsx";
are created. This information includes the name of including many supplied by SAS® or those that
System
System
names. ods output variables=work.vardata;
the object, the name of the template, labels, paths,
System
Customizing
Customizing Reports
Reports
* *Select
Selectonly
onlythethe"variables"
"variables"table; table; you create. This tip sheet presents the most
and label paths. ods
odsselect
* select variables;
variables;
Customizing Reports
Select only the "variables" table;
common statements and options in ODS.

Tip
TipSheet
Sheet
ods select variables;
odsods proclabel
proclabel “text”;
“text”; * *Turn
Turnoffoffproc
proctitles;
titles;
Specifies
Specifies
ininthe
Locating
ods proclabel
text
Specifies
thetable
table
odstemplates
text
of
toto
of
use
text
use
contents.
inin
contents.
Style
“text”;
place
place ofof
Definitions
thethe
procedure
procedure label
to use in place of the procedure label
label
ods

* *Run
Advanced Techniques
odsnoproctitle;
* noproctitle;
Turn off proc titles;
ods noproctitle;
Runthe
theContents
ContentsProcedure;
Procedure;
Tip Sheet
in the table of contents. For
proc
proc
more information on advanced techniques such
*contents
contents
Run the data=sashelp.class;
data=sashelp.class;
Contents Procedure; run; run;
ods Entering
ods proctitle; odstemplates
proctitle; ororodsodsnoproctitle; in the command bar
noproctitle; the DOCUMENT
as proc destination which allows
contents data=sashelp.class; run;
opens
Specifiesods the
Specifies Template
proctitle;
whether
whether oror
or Browser.
ods
not
notthethe The styles
noproctitle;
procedure
procedure title supplied
title should by
should extensive
* *Close
Closeall manipulation
allODS of reports, or PROC
ODSdestinations;
destinations; Thistiptipsheet
This sheetplaces
placesfrequently
frequentlyused used
bebe SAS are in the
Specifies
printed.
printed. SASHELP.TMPLMST/Styles
whether or not the procedure title folder. should odsTEMPLATE
ods_all_
* _all_close;
Close allwhich
close; ODS allows you to modify styles as
destinations;
For complete information, refer to the This tipinsheet
information
information inone places
oneplace,
place,onfrequently
ononeonesheet used
sheet ofof
ods _all_ close;
be printed. well as create
* *Re-open
Re-open the table
thelisting templates
listing or modify table
destination;
destination; Base SAS® 9.4 documentation at paper,information
paper,sosoyou youdon’tin one
don’thave place, on
havetotosearch one
searchthroughsheet
throughtheofthe
ods proc
ods selecttemplate;
selectselection(s); list styles; run;
selection(s); templates used by SAS procedures, see http://support.sas.com/documentation/onlinedoc/ paper, so you don’t have to search through the
ods
odslisting;
* listing;
Re-open the listing destination; online
onlinedocumentation.
documentation.It Italso alsogives
givesyou you
odsods ods
Lists
excludeselect
the
exclude selection(s);
SAS-supplied
selections(s);
selections(s); styles to the log. http://support.sas.com/v9doc.
ods listing; base/index.html. online documentation. It also gives you
something
somethingtototake takehome,
home,type typein,in,and
andtry.try.
Specifiesods exclude
Specifies thetheoutput selections(s);
output objects
objects toto
show
show ororexclude
exclude from
from something to take home, type in, and try.
thethe Specifies
report,
report, the output objects to show or exclude from
respectively.
respectively.
the report, respectively. ODS
ODSallows
allowsyou youtotoformat
formatyour yourreports
reportsinin
odsods show;
show; ODS
various
various allowssuch
formats
formats you
suchto
asasformat
HTML,
HTML, your
PDF,
PDF,reports
Microsoft in
Microsoft
Displays ods current
Displays show;
current select
select andandexclude
excludelists.
lists. Word, various
Word,Microsoft formats
MicrosoftExcel, such
Excel,and as
andmanyHTML,
manyothers.PDF, Microsoft
others.It It
QuickTime™
QuickTime™ andanda a
Displays current select and exclude lists. TIFF
areare
TIFF
(LZW)
needed
(LZW)
needed
decompressor
to see
to
decompressor
QuickTime™
see
thisthis
picture.and a
picture.
Word,
enables
enables you
youMicrosoft
totocustomizeExcel,
customize yourandreports
your many
reports others.
byby It
odsods trace
trace on;on; TIFF (LZW) decompressor
are needed to see this picture. enables
selecting
selectingonly you
onlythe to customize
theresults
resultsyou your
youwant reports
wanttotosee.see.Itby
It
Displays ods information
Displays trace on; about
information about output
outputobjects
objects asasthey
they even selecting
evenletsletsyou only
youapply the
applystylesresults you
stylestotoyour want
yourreports to see. It
reports
areare Displays
created.
created. Thisinformation
This information
informationabout outputtheobjects
includes
includes the
namename as they
ofof evenmany
including
including lets
many you apply by
supplied
supplied styles
bySAS to
SAS®® your
or reports
orthose
those that
that
thethe are
object, created.
object, thethename This
name ofinformation
of
thethe
template, includes
template, labels,
labels, thepaths,
paths,name of you including
youcreate.
create.This many supplied
Thistiptipsheet by
sheetpresents SAS
presentsthe
®
or those that
themost
most
andand the
label object,
label paths.the name of the template, labels, paths,
paths. you statements
create. Thisandtip sheet presents the most
common
common statements andoptions
options ininODS.
ODS.
and label paths. common statements and options in ODS.
Locating
LocatingStyle
StyleDefinitions
Definitions Advanced
AdvancedTechniques
Techniques
Locating Style Definitions Advanced Techniques
odstemplates
odstemplates For
Formore
moreinformation
information onon
advanced
advanced techniques
techniques such
such
odstemplates
Entering
Entering odstemplates
odstemplates ininthethe
command
command barbar asas For more information
DOCUMENT
thethe DOCUMENT on advanced
destination
destinationwhich
which techniques
allows such
allows
opens Entering
opensthethe odstemplates
Template
Template Browser.
Browser. The instyles
The the command
styles
supplied
supplied bar
byby extensive
extensive DOCUMENT
as themanipulation
manipulation ofofdestination
reports,
reports, which
PROCallows
PROC
oror
SAS
SAS opens
are
areinin the
the Template
the Browser. The styles folder.
SASHELP.TMPLMST/Styles
SASHELP.TMPLMST/Styles supplied
folder. by extensivewhich
TEMPLATE
TEMPLATE manipulation
which allows
allows ofyou
you reports,
toto or PROC
modify
modify styles
styles asas For
For complete
complete information,
information, refer
refer toto thethe
SAS are in the SASHELP.TMPLMST/Styles folder. well
well TEMPLATE
as as create
create table
table which allows
templates
templates oror you to table
modify
modify modify
table styles as SAS Institute
Base
Base For
SAS SAS ® ® Inc. information,
complete
9.49.4
World Headquarters
documentation
documentation atrefer
at to the
proc
proctemplate;
template; listlist
styles;
styles;run;
run; well used
templates
templates asused
create
byby table
SAS
SAS templates
procedures,
procedures, or modify table
seesee +1 919 677 8000
Base SAS® 9.4 documentation
http://support.sas.com/documentation/onlinedoc/
http://support.sas.com/documentation/onlinedoc/
sas.com/offices
at
Lists proc
Lists
the
the template;
SAS-supplied
SAS-supplied list styles;
styles
stylestoto run;
thethe
log.
log. templates used by SAS procedures, see
http://support.sas.com/v9doc.
http://support.sas.com/v9doc. http://support.sas.com/documentation/onlinedoc/
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks
base/index.html.
base/index.html.
of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and
Lists the SAS-supplied styles to the log. http://support.sas.com/v9doc. base/index.html.
product names are trademarks of their respective companies. Copyright © 2019, SAS Institute Inc.
All rights reserved. 1901756.0319
ODS
ODS
ODS
ODS
ODSTip
Tip
Tip
Tip
TipSheet
Sheet
Sheet
Sheet

Common
Common
Common
Common
Destinations
Destinations
Destinations
Destinations HTML
HTML
HTML
HTML
Destination
Destination
Destination
Destination PDF
PDF
PDF
PDF
Destination
Destination
Destination
Destination WORD
WORD
WORD
WORD
Destination
Destination
Destination
Destination
“Destination”
“Destination”
“Destination”
“Destination”
is isa is
term
a is
term
a aterm
for
term
forthe
for
the
forODS
the
ODS
theODS
ODS
driver
driver
driver
driver
that
that
that
that Basic
Basic
Basic
Basic
Usage
Usage
Usage
Usage Basic
Basic
Basic
Basic
Usage
Usage
Usage
Usage Basic
Basic
Basic
Basic
Usage
Usage
Usage
Usage
generates
generates
generates
generates
a specific
a specific
a aspecific
specific
output
output
output
output
format.
format.
format.
format.
ods
odsods
html
ods
html <option(s)>;
html <option(s)>;
html <option(s)>;
<option(s)>; ods
odsods
pdf
ods
pdfpdf
pdf <option(s)>;
<option(s)>;
<option(s)>;
<option(s)>; ods
odsods
word
ods
word <option(s)>;
word <option(s)>;
word <option(s)>;
<option(s)>;
……procedure

procedure
…procedure
procedure
code
code
code
…code
… ……
Destination
Destination
Destination
Destination
Name
Name
Name
Name
Description
Description
Description
Description ods
odsods
html
ods
html
html
html
close;
close;
close;
close; ……procedure
procedure
… … procedure
code
code
procedure …code
… ……
code ……procedure

procedure
…procedure
procedure
code
code
code
…code
… ……
Listing
Listing
Listing
Listing Plain
Plain
Plain
Plain
text
text
text
text ods
ods pdf
ods
odspdf close;
pdf
pdfclose;
close;
close; ods
odsods
word
ods
word
word
word
close;
close;
close;
close;
HTML
HTML
HTML
HTML Primary
Primary format
Primary
Primary
format used
format
format
used on
usedonthe
used on
the
onthe
the
World
World Wide
World
World
Wide Web
Wide
WideWeb (WWW)
Web
Web
(WWW)
(WWW)
(WWW) File
File
File
File
Options
Options
Options
Options File
File
File
File
Options
Options
Options
Options File
File
File
File
Options
Options
Options
Options
XML
XMLXML
XML Plain text
Plain
Plain
Plain
textdata
text
text
data interchange
data
data
interchange
interchange
interchange
format
format
format
format file=“filename”
file=“filename”
file=“filename”
file=“filename”
ororbody=“filename”
body=“filename”
ororbody=“filename”
body=“filename” file=“filename”
file=“filename”
file=“filename”
file=“filename”
Specifies
Specifies
Specifies
Specifies
the
thename
the
name
thename
name
ofofthe
of
the
offile
the
file
thethat
file
file
that
that
will
that
will
will
contain
will
contain
contain
contain
the
thethe
the file=“filename”
file=“filename”
file=“filename”
file=“filename”
PDF
PDFPDF
PDF Works
Works well
Works
Works
well for
well forprinting
well for
printing asas asas
forprinting
printing Specifies
Specifies
Specifies
Specifies
the
thename
the
name
thename
name
ofofthe
of
the
offile
the
file
thethat
file
file
that
that
will
that
will
will
contain
will
contain
contain
contain
the
thethe
the
output
output
output
output
tables.
tables.
tables.
tables. Specifies
Specifies
Specifies
Specifies
the
thename
the
name
thename
name
ofofthe
of
the
offile
the
file
thethat
file
file
that
that
will
that
will
will
contain
will
contain
contain
contain
the
thethe
the
well as
well ason-screen
well
wellas
on-screen
ason-screen viewing
on-screenviewing
viewing
viewing output
output
output
output
tables.
tables.
tables.
tables.
output
output
output
output
tables.
tables.
tables.
tables.
Postscript
Postscript
Postscript
Postscript Works
Works
Works
Works
well
well
well
for
well
forprinting
for
printing
forprinting
printing
Word
Word
Word
Word Used
Usedbybymost
Used
Used by
most
bymostword
most
word
word
word contents=“filename”
contents=“filename”
contents=“filename”
contents=“filename” Document
Document
Document
Document
Metadata
Metadata
Metadata
Metadata
Options
Options
Options
Options
Specifies
Specifies
Specifies
Specifies
the
thename
the
name
thename
name
ofofthe
of
the
offile
the
file
thethat
file
file
that
that
will
that
will
will
contain
will
contain
contain
contain
a a aa Document
Document
Document
Document
Metadata
Metadata
Metadata
Metadata
Options
Options
Options
Options
processors
processors
processors
processors
Excel
Excel
Excel
Excel Share
ShareSAS
Share
Share
SAS data
SAS
SASdatawith
data
data
with
with
with table
table
table
of
table
ofcontents
of
contents
ofcontents
contents
forforthe
for
the
foroutput.
the
output.
theoutput.
output. author=“text”
author=“text”
author=“text”
author=“text”
Microsoft
Microsoft Excel
Microsoft
MicrosoftExcel
Excel
Excel keywords=“text”
keywords=“text”
keywords=“text”
keywords=“text” author=“text”
author=“text”
author=“text”
author=“text”
frame=“filename”
frame=“filename”
frame=“filename”
frame=“filename” subject=“text”
subject=“text”
subject=“text”
subject=“text” keywords=“text”
keywords=“text”
keywords=“text”
keywords=“text”
Output
Output
Output
Output Creates
CreatesSAS
Creates
Creates
SASSASdata
SAS
data sets
data
datafrom
sets
sets
sets
from
from
from
Specifies
Specifies
Specifies
Specifies
the
thename
the
name
thename
name
ofofthe
of
the
offile
thefile
thethat
file
file
that
that
includes
that
includes
includes
includes
the
thebody
the
body
thebody
body title=“text”
title=“text”
title=“text”
title=“text” title=“text”
title=“text”
title=“text”
title=“text”
ODS
ODS tables
ODS
ODS
tables
tables
tables
file
fileand
file
file
andand
table
and
table
table
of
table
ofcontents
of
contents
ofcontents
contents
into
into
into
ainto
set
a set
aof
aset
of
set
scrollable
of
scrollable
ofscrollable
scrollable Specifies
Specifies
Specifies
Specifies
the
theauthor,
the
author,
theauthor,
author,
keywords,
keywords,
keywords,
keywords,subject,
subject,
subject,
subject,
and and
and
title
and title
title in inin
intitle Specifies
Specifies
Specifies
Specifies
the
theauthor,
the
author,
theauthor,
author,
keywords,
keywords,
keywords,
keywords,
and
and
and
title
and
title
title
intitle
inthe
in
the
inthe
the
frames.
frames.
frames.
frames. the the
themetadata
themetadata
metadata
metadata of
ofofthe
thethe
thePDF
ofPDF
PDF document.
document.
PDF
document.
document. metadata
metadata
metadata
metadata
ofofthe
ofthe
ofWord
the
Word
theWord
Word
document.
document.
document.
document.
Opening
Opening
Opening
Opening
and
and
and
and
Closing
Closing
Closing
Closing
Destinations
Destinations
Destinations
Destinations
stylesheet=“filename”
stylesheet=“filename”
stylesheet=“filename”
stylesheet=“filename” Other
Other
Other
Other
Commonly
Commonly
Commonly
Commonly
Used
Used
Used
Used
Options
Options
Options
Options Other
Other
Other
Other
Commonly
Commonly
Commonly
Commonly
Used
Used
Used
Used
Options
Options
Options
Options
ods
odsods
ods
destination-name
destination-name
destination-name
destination-name
<option(s)>;
<option(s)>;
<option(s)>;
<option(s)>; Specifies
Specifies
Specifies
Specifies
ananexternal
an
external
anexternal
external
filename
filename
filename
filename
forforstyles.
for
styles.
forstyles.
styles.
Opens
Opens
Opens
Opens
the
theODS
the
ODS
theODS
ODS
destination,
destination,
destination,
destination,
destination-name,
destination-name,with
with
destination-name,
destination-name,with
with columns=n
columns=n
columns=n
columns=n gfootnote/nogfootnote
gfootnote/nogfootnote
gfootnote/nogfootnote
gfootnote/nogfootnote
options,
options,
options,
options,
option(s).
option(s).
option(s).
option(s). The
TheThe
following
The
following
following
following
file
filesub-options
file
file
sub-options
sub-options
sub-options
cancancan
becan
bespecified
be
specified
bespecified
specified
inin inin Specifies
Specifies
Specifies
Specifies
the
thenumber
the
number
thenumber
number
ofofcolumns
of
columns
ofcolumns
columns
ononeach
on
each
oneach
page.
each
page.
page.
page. Determines
Determines
Determines
Determines
if ifgraphics
graphics
ififgraphics
graphics
handle
handle
handle
handle
footnotes
footnotes
footnotes
footnotes
ininimages.
in
images.
inimages.
images.
parentheses
parentheses
parentheses
parentheses
following
following
following
following
each
each
each
of
each
ofthe
of
the
ofabove
the
above
theabove
above
options.
options.
options.
options.
ods
odsods
ods
destination-name
destination-name
destination-name close;
destination-name close;
close;
close; compress=n
compress=n
compress=n
compress=n gtitle/nogtitle
gtitle/nogtitle
gtitle/nogtitle
gtitle/nogtitle
Closes
Closes
Closes
Closes
the
theODS
the
ODS
theODS
ODS
destination,
destination,
destination,
destination,
destination-name.
destination-name.
destination-name.
destination-name. no_top_matter
no_top_matter
no_top_matter
no_top_matter Specifies
Specifies
Specifies
Specifies
the
thelevel
the
level
thelevel
of
level
ofcompression.
of
compression.
ofcompression.
compression. Determines
Determines
Determines
Determines
if ifgraphics
graphics
ififgraphics
graphics
handle
handle
handle
handle
titles
titles
titles
in
titles
inimages.
in
images.
inimages.
images.
no_bottom_matter
no_bottom_matter
no_bottom_matter
no_bottom_matter
Specifies
Specifies
Specifies
Specifies
that
that
that
no
that
nobeginning
no
beginning
nobeginning
beginning
ororending
or
ending
orending
ending
markup,
markup,
markup,
markup, notoc
notoc
notoc
notoc image_dpi=nnn
image_dpi=nnn
image_dpi=nnn
image_dpi=nnn
ods
odsods
_all_
ods
_all_
_all_
_all_
close;
close;
close;
close; Specifies
Specifies
Specifies
Specifies
that
that
that
the
that
thetable
the
table
thetable
of
table
ofcontents
of
contents
ofcontents
contents
bookmarks
bookmarks
bookmarks
bookmarks
Closes
Closes
Closes
Closes
allallODS
all
ODS
allODS
ODS
destinations
destinations
destinations
destinations
(including
(including
(including
(including
Listing).
Listing).
Listing).
Listing). respectively,
respectively,
respectively,
respectively,
should
should
should
should
bebeinserted
be
inserted
beinserted
inserted
into
into
into
the
into
theoutput
the
output
theoutput
output
file.
file.
file.
file. Specifies
Specifies
Specifies
Specifies
the
theDPI
the
DPI
theDPI
(dots
DPI
(dots
(dots
(dots
per
perinch)
per
per
inch)
inch)
inch)
ofofimages
of
images
ofimages
images
should
should
should
should
not
notbe
not
not
begenerated.
be
generated.
begenerated.
generated. generated
generated
generated
generated
forforgraphical
for
graphical
forgraphical
graphical
output.
output.
output.
output.
url=“URL”
url=“URL”
url=“URL”
url=“URL”
Basic
Basic
Basic
Basic
ODS
ODS
ODS
ODS
Usage
Usage
Usage
Usage Specifies
Specifies
Specifies
Specifies
a URL
a URL
a aURL
URL
totobeto
beto
used
be
used
beused
in
used
inplace
in
place
inplace
place
ofofthe
of
the
offilename
the
filename
thefilename
filename
startpage=yes
startpage=yes
startpage=yes
startpage=yes
| no
| no
|| no
|now
|no
now
| now
| now startpage=yes
startpage=yes
startpage=yes
startpage=yes
| no
| no
|| no
|now
|no
now
| now
| now
Controls
Controls
Controls
Controls
page
page
page
breaks.
page
breaks.
breaks.
breaks. Controls
Controls
Controls
Controls
page
page
page
breaks.
page
breaks.
breaks.
breaks.
ods
ods destination-name;
odsdestination-name;
ods destination-name;
destination-name;
ininlinks
in
links
inlinks
to
links
tothe
to
the
tofile.
the
file.
thefile.
file.
… …procedure
procedure
… …procedure
procedure
code
code
code
…code
… …… style=style-definition
style=style-definition
style=style-definition
style=style-definition style=style-definition
style=style-definition
style=style-definition
style=style-definition
ods
ods destination-name
odsdestination-name
ods destination-name
destination-name
close;
close;
close;
close; Other
Other
Other
Other
Commonly
Commonly
Commonly
Commonly
Used
Used
Used
Used
Option
Option
Option
Option Specifies
Specifies
Specifies
Specifies
the
thestyle
the
style
thestyle
definition
style
definition
definition
definition
totouse.
to
use.
touse.
use. Specifies
Specifies
Specifies
Specifies
the
thestyle
the
style
thestyle
definition
style
definition
definition
definition
totouse.
to
use.
touse.
use.
style=style-definition
style=style-definition
style=style-definition
style=style-definition uniform
uniform
uniform
uniform
Specifies
Specifies
Specifies
Specifies
the
thestyle
the
style
thestyle
definition
style
definition
definition
definition
totouse.
to
use.
touse.
use. Specifies
Specifies
Specifies
Specifies
that
that
that
multiple
that
multiple
multiple
multiple
page
page
page
tables
page
tables
tables
tables
should
should
should
should
retain
retain
retain
retain
their
their
their
width
their
width
width
width
across
across
across
across
pages.
pages.
pages.
pages.

You might also like