MASUG - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

MASUG

Description:

FedEx. When you want to send a simple report. Proc print handles ... filename mail email 'wjsmith1_at_fedex.com' subject='Monthly Update'; data _null_; file mail; ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 20
Provided by: srth8
Category:
Tags: masug | com | fedex | locations

less

Transcript and Presenter's Notes

Title: MASUG


1
MASUG
  • December 5, 2005

2
Agenda
  • Announcements
  • Tips Tricks
  • Presentation
  • Working Smarter, Not Harder with DDE Did I
    Really Spend All That Time Formatting My Report
    in Excel?
  • Giveaways
  • Next Meeting

3
Announcements
  • SAS Training Center at U of M if interested in
    registering, need to do so approx. 3 weeks prior
    to course date.
  • SUGI 31 San Francisco March 26-29, 2006

4
Tips Tricks
  • Using Macro Variables for Automation Michael
    Bates

5
When Proc Print Isnt Enough
  • MASUG Tips Tricks
  • Dec 5, 2005
  • Walt Smith
  • FedEx

6
When you want to send a simple report
  • Proc print handles simple tables quite well
  • The simple output is just a bit plain (as it
    should be)
  • SAS 9 allows style changes that are easily
    accessible
  • No need for proc template and all that scary
    stuff!

7
The plain example
  • title1 "Ground History Update"
  • proc print label
  • var packages netrev adv adr yld wpp
  • by notsorted svctxt
  • id date
  • run

8
The result
9
Now add some style
  • ods html file"Ground_Update.html"
    stylestyles.sasweb
  • options missing' '
  • title1 "Ground History Update"
  • proc print label
  • style( header ) backgroundcxadbade
    foregroundblack
  • var packages netrev
  • var adv adr /
  • style( data ) backgroundcxffbb33
    foregroundblack
  • var yld wpp
  • by notsorted svctxt
  • id date /
  • style( data ) backgroundcxadbade
    foregroundblack
  • style( header ) backgroundcxadbade
    foregroundblack
  • run
  • ods html close
  • filename mail email "wjsmith1_at_fedex.com"
    subject"Monthly Update"
  • data _null_
  • file mail
  • put "!EM_ATTACH!('Ground_Update.html')"

10
The result
11
Tips Tricks
  • Getting variable names into a macro variable
  • proc contents data my_dataset noprint out
    my_outset
  • run
  • proc sql noprint
  • select distinct name
  • into varnames separated by
  • from my_outset
  • order by varnum
  • quit

12
Tips Tricks
  • Using only some variables
  • proc sql noprint
  • select distinct name
  • into varnames3 separated by ' and '
  • from my_outset
  • where varnum in (1, 2, 4)
  • order by varnum
  • quit

13
Tips Tricks
  • Using only some variables contd
  • put varnames3
  • id and gender and j_class

14
Tips Tricks
  • Creating an index
  • PROC SQL
  • CREATE INDEX CATEGORY ON libref.MOVIES
  • QUIT

15
Tips Tricks
  • Creating a compound index
  • PROC SQL
  • CREATE INDEX CATRATE
  • ON libref.MOVIES (CATEGORY, RATING)
  • QUIT

16
Tips Tricks
  • Removing an index
  • PROC SQL
  • DROP INDEX CATRATE FROM libref.MOVIES
  • QUIT
  • Previous 3 slides adapted from Sample 1557
    Exploring the World of Indexes by Kirk Paul
    Lafler on support.sas.com

17
Our Main Presentation
18
Free Stuff
19
Next Meeting
  • Tentative location FedEx
  • Would like to invite SAS speaker
  • Topics of interest?
  • Will be back to Thursday 3-5pm
  • Other suggestions?
Write a Comment
User Comments (0)
About PowerShow.com