MASUG - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

MASUG

Description:

MASUG. March 10, 2006. at FedEx. Agenda. Announcements. Tips & Tricks. Lisa Horwitz from SAS ... New location in FedEx Institute of Technology. Announcements (cont'd) ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 15
Provided by: michael1341
Category:
Tags: masug | fedex | locations

less

Transcript and Presenter's Notes

Title: MASUG


1
MASUG
  • March 10, 2006
  • at FedEx

2
Agenda
  • Announcements
  • Tips Tricks
  • Lisa Horwitz from SAS

3
Announcements
  • Next meeting May 2006
  • Hopefully at the Doubletree on Sanderlin with
    beverages and snacks (tentative 5-7 pm)
  • SESUG speaker topic choice
  • SAS training in Memphis
  • SAS makes go/no go decision 3 weeks before class
    date so register early!
  • New location in FedEx Institute of Technology

4
Announcements (contd)
  • Volunteers for Planning Committee?
  • No experience needed and no compensation provided
    ?
  • SUGI March 26-29
  • Get together at the Kickback Party?
  • SESUG October 8-9 in Atlanta
  • Call for Papers closes April 7th

5
Complete Automationof Routine ReportsUsing
Macro VariablesMemphis Area SAS Users
GroupFriday, March 10, 2006
  • Michael Bates, Risk Analyst
  • First Horizon National Corporation
  • (901) 257-6038
  • mwbates_at_firsthorizon.com

6
Goal
  • Submit a routine SAS job, in a open session or in
    a scheduled queue, with no user input needed

Why ?
  • Eliminate user error
  • Easily pass reports on to others

7
Determining Appropriate Time Frame
  • Todays Date Log
  • let tdy sysfunc(today()) 1 let tdy
    sysfunc(today())
  • put tdy tdy. 2 put tdy tdy.
  • tdy 16862
  • This Year Log
  • let mnth sysfunc(month(tdy.)) 3 let mnth
    sysfunc(month(tdy.))
  • put mnth mnth. 4 put mnth mnth.
  • mnth 3
  • This Month Log
  • let yr sysfunc(year(tdy.)) 5 let yr
    sysfunc(year(tdy.))
  • put yr yr. 6 put yr yr.
  • yr 2006
  • This Week Log
  • let wk sysfunc(week(tdy.)) 7 let wk
    sysfunc(week(tdy.))
  • put wk wk. 8 put wk wk.
  • wk 9

8
Converting Into Date Format
  • Date
  • let d_date sysfunc(mdy(mnth.,1,yr.),date9.)
  • put d_date d_date.
  • Log
  • 11 let d_date sysfunc(mdy(mnth.,1,yr.),dat
    e9.)
  • 12 put d_date d_date.
  • d_date 01MAR2006
  • DateTime
  • let dt_date sysfunc(mdy(mnth.,1,yr.),date9.)
    000000
  • put dt_date dt_date.
  • Log
  • 13 let dt_date sysfunc(mdy(mnth.,1,yr.),da
    te9.)000000
  • 14 put dt_date dt_date.
  • dt_date 01MAR2006000000

9
Running a job at a given time
  • Job can't run until 3rd of the month at 230pm
  • let launch1 sysfunc(mdy(sysfunc(month(eval(
    tdy.30))),3,
  • sysfunc(year(eval(tdy.30)))),d
    ate9.)143000
  • put launch1 launch1
  • data _null_
  • slept wakeup("launch1."dt)
  • run
  • Log
  • 15 let launch1 sysfunc(mdy(sysfunc(month(e
    val(tdy.30))),3,
  • 16
    sysfunc(year(eval(tdy.30)))),date9.)143000
  • 17 put launch1 launch1
  • launch1 03APR2006143000
  • Job can't run until Sunday at 800am
  • let launch2 sysfunc(mdy(
  • sysfunc(month(eval(tdy.
    eval(((sysfunc(weekday(tdy.))) - 8) -1)))),
  • sysfunc(day(eval(tdy. eval(((sysfunc(we
    ekday(tdy.))) - 8) -1)))),
  • sysfunc(year(eval(tdy.
    eval(((sysfunc(weekday(tdy.))) - 8) -1))))),
  • date9.)080000

10
Customizing Output
  • File Names
  • let mon_yr_nm sysfunc(mdy(mnth.,1,yr.),monyy
    5.)
  • put mon_yr_nm mon_yr_nm.
  • Log
  • 28 let mon_yr_nm sysfunc(mdy(mnth.,1,yr.),
    monyy5.)
  • 29 put mon_yr_nm mon_yr_nm.
  • mon_yr_nm MAR06
  • DDE Column Or Row Selection
  • let col eval((((yr. - 2000) 12) mnth.)
    - 74)
  • put col col.
  • Log
  • 30 let col eval((((yr. - 2000) 12)
    mnth.) - 74)
  • 31 put col col.
  • col 1
  • DDE Column Or Row Headings
  • let col_name sysfunc(mdy(mnth.,1,yr.),monnam
    e9.)
  • put col_name col_name.

11
Useful Date Functions
12
Useful Date Formats
13
Useful DateTime Formats
14
Lisa Horwitz
  • Systems Engineer Manager for SAS
Write a Comment
User Comments (0)
About PowerShow.com