SAS Tutorial | Getting the Most out of SAS Macro and SQL

Sdílet
Vložit
  • čas přidán 15. 07. 2024
  • Watch as John presents two of his favorite macro and SQL tricks.
    Trick 1: Instantly delete every user-defined macro variable in the global symbol table with the DELETEALL macro. This useful tip saves memory and keeps the global symbol table clean of user defined macro variables.
    Trick 2: Learn to create a macro variable that contains a delimited list of the unique values of a selected SAS variable from a selected SAS dataset using the VALUELIST macro. The resulting macro variable can be referenced for purposes of report-writing or data-driven macro parameter validation.
    Content Outline
    00:00 - Overview
    02:30 - Learn More links of interest
    04:40 - Scenario 1: PROC SQL demo for a detailed listing
    07:03 - Scenario 2: Macro program demo and mcompilenote option
    12:13 - Scenario 3: Create a macro variable and a report with noprint on and off
    15:40 - Scenario 4: Generate a list of distinct values
    17:45 - Scenario 5: Building validation lists in a Macro program
    23:23 - Scenario 6: Reference one Macro program from another
    27:15 - Scenario 7: Validation to allow for human error
    33:18 - Scenario 8: Eliminate selected macro variables in the Windowing environment
    40:49 - Scenario 9: Eliminate selected macro variables using escape character
    42:33 - Scenario 10: Eliminate selected macro variables in SAS Studio and SAS Enterprise Guide
    Learn more about SAS Software
    SAS Macro Language 1: Essentials class - support.sas.com/edu/schedules...
    SAS SQL 1: Essentials class - support.sas.com/edu/schedules...
    Free SAS Online Training - www.sas.com/en_us/training/of...
    Contact SAS® - www.sas.com/en_us/contact.geo...
    SUBSCRIBE TO THE SAS USERS CZcams CHANNEL #SASUsers #LearnSAS #SASGF
    czcams.com/users/SASUsers?sub_...
    ABOUT SAS
    SAS is a trusted analytics powerhouse for organizations seeking immediate value from their data. A deep bench of analytics solutions and broad industry knowledge keep our customers coming back and feeling confident. With SAS®, you can discover insights from your data and make sense of it all. Identify what’s working and fix what isn’t. Make more intelligent decisions. And drive relevant change.
    CONNECT WITH SAS
    SAS ► www.sas.com/contact
    SAS Customer Support ► support.sas.com
    SAS Communities ► communities.sas.com
    SAS Analytics Explorers ► explorers.sas.com
    Facebook ► / sassoftware
    Twitter ► / sassoftware
    LinkedIn ► / sas
    Blogs ► blogs.sas.com
    RSS ►www.sas.com/rss
  • Věda a technologie

Komentáře • 15

  • @deepakkumaar9665
    @deepakkumaar9665 Před 3 lety +2

    Thanks a lot sir. Love from India 🇮🇳

  • @zbigniewz.lewandowski8629

    E x c e l l e n t Sir !

  • @kirkpaullafler2230
    @kirkpaullafler2230 Před 4 lety +1

    Great job!

  • @zbigniewz.lewandowski8629

    Excellent ! Thanks! Great!

  • @somcana
    @somcana Před rokem +1

    Never seen SAS explained so clearly, intuitively, and naturally. I live in Canada, how can I take your classes?

    • @SASUsers
      @SASUsers  Před rokem

      Thank you for positive feedback! You can check out our SAS Training courses here 2.sas.com/6057O1UWL

  • @carlosamaral5555
    @carlosamaral5555 Před 3 lety +1

    Very good explanation. Thank you!

  • @fabeehasheikh5000
    @fabeehasheikh5000 Před 3 lety

    Very nice explanation Sir. Thank you so much.

    • @SASUsers
      @SASUsers  Před 3 lety

      Absolutely! We're glad you enjoyed the content!

  • @skyfawen
    @skyfawen Před 4 lety +1

    Thank you!

  • @Bishvamitra
    @Bishvamitra Před 2 lety

    This is awesome, good work. Any way to restore those macro variable without compile if I deleted any by mistake?

    • @SASUsers
      @SASUsers  Před 2 lety

      Thank you! We are checking on this for you!

    • @SASUsers
      @SASUsers  Před 2 lety

      Bishvamitra, Chances are you, won't delete macro variables by mistake because they remain in the global symbol table until you change them, delete them intentionally with the %SYMDEL statement or end your SAS session in; which case the macro variables in the global symbol table are deleted and cleared out(as mentioned in the video around 35:46+). But this does bring up a good point, if you need to recreate user-defined macro variables from one SAS session to the next or even in your same SAS session if you delete all of them with the nifty %delete macro that was shown in the video, you will have to save the code that creates the macro variables and resubmit the code to recreate them if they get deleted.