0% found this document useful (0 votes)
59 views8 pages

Chapter 5 - SAS Procedures: Humphrey Brydon Office 3.25 Hbrydon@uwc - Ac.za

This document discusses formatting and modifying output from SAS procedures. It covers formatting display output, adding titles and footnotes, including comments in code, modifying proc print options, and using ODS output to enhance outputs. Formatting changes only the displayed output and should not change raw data. Comments help explain code and can be added between /* */ or * ;. Proc print can be modified using options like "double", "label", "N=", and "OBS=". ODS output allows enhancing outputs by specifying the format before and closing after the relevant code.

Uploaded by

jkleinhans.jk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views8 pages

Chapter 5 - SAS Procedures: Humphrey Brydon Office 3.25 Hbrydon@uwc - Ac.za

This document discusses formatting and modifying output from SAS procedures. It covers formatting display output, adding titles and footnotes, including comments in code, modifying proc print options, and using ODS output to enhance outputs. Formatting changes only the displayed output and should not change raw data. Comments help explain code and can be added between /* */ or * ;. Proc print can be modified using options like "double", "label", "N=", and "OBS=". ODS output allows enhancing outputs by specifying the format before and closing after the relevant code.

Uploaded by

jkleinhans.jk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Chapter 5 – SAS Procedures

Humphrey Brydon
Office 3.25
hbrydon@uwc.ac.za
Formatting Display Output

• Formatting the display output makes it easier to read.

• Only changes the output that is displayed.

• Raw data should not be formatted for display purposes.


• Assign formats in the proc format step and recall these formats in the
proc print step.
• Formats can be applied to a single variable or a range of variables.
Formatting Display Output

*DFORMAT2.sas
Titles and Footnotes

• The ‘Title’ statement places text at the top of each output.

• The ‘Footnote’ statement places text at the end of each output.


• To delete a title or footnote simply declare the ‘Title’ or ‘Footnote’
statement without any text.

*dtitle.sas
Comments

• Add comments in your program as explanatory text

• Comments allow you to understand your code better

• Comments can be added in two ways:

o Placing text between /* and */ (e.g. /*My Comment*/ )

o Placing text between * and ; (e.g. *My Comment; )

• All commented text should be green


Modifying Proc Print

• Specify these options in the proc statement

o “double” – double spaces the output

o “label” – allows you to include any labels

o “N = “- Declares a heading and calculates a count for the number

of observations

o “OBS = “- Specifies a label for the observation number column

o “ROUND “– rounds the values

*aprint1.sas
ODS Output

• Enhance your output using the ODS output statement

• Declare “ODS HTML; ” before the output you want to enhance

• Close the ODS output using the “ODS HTML close; ” directly after the

code for the output that you want to enhance

• You can replace “HTML” with PDF, RTF, etc. depending on the output

you want.

• HTML is the default format from SAS9.4 onwards.

*aprint1.sas
READ THROUGH CHAPTER 5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy