Macros in Sas

Satisfactory Essays
SUGI 31

Hands-on Workshops

Paper 107-31

Intermediate and Advanced SAS® Macros
Steven First, Katie Ronk, Systems Seminar Consultants, Madison, WI
Abstract
This hands-on workshop presents some intermediate-to-advanced macro topics such as macro referencing environments, macro interfaces (SYMGET, SYMPUT, EXECUTE, RESOLVE, PROC SQL), macro quoting, and macro functions. Good practices and alternatives to macros are also discussed. After a short lecture, attendees will perform hands-on exercises until the end of the session.

Introduction
The SAS® programming language has a rich toolbox of features that can offer a lot of power to the user. The SAS macro language can be used to generate and alter SAS code. By combining these two languages the user can create some very dynamic systems. Combining these two languages can be daunting however. This workshop will concentrate on the interfaces available between the SAS macro language and other system components.

SAS Macro Overview
SAS macros construct input for the SAS compiler. Some functions of the SAS macro processor are to pass symbolic values between SAS statements and steps, to establish default symbolic values, to conditionally execute SAS steps, and to invoke very long, complex code in a quick, short way. It should be noted that the macro processor is the SAS system module that processes macros and the SAS macro languages is how you communicate with the processor. Without macros it is not easy to substitute variable text in statements such as TITLEs, to communicate across SAS steps, to establish default values, and to conditionally execute SAS step. Macros can do this and also hide complex code that can be invoked easily. Without macros, SAS programs are DATA and PROC steps that are scanned one statement at a time looking for the beginning of step (step boundary). When the beginning of step is found, all statements in the step are compiled and

this continues until when the end of step is found (the

You May Also Find These Documents Helpful

  • Satisfactory Essays

    TREND DESCRIPTION IMPACT OF TREND IMPLICATIONS OF TREND POLITICAL Refers to the stability of the economic environment, the attitudes and movements of political parties. This is entwined in government influence on tax policies, trade agreements, legislative Laws, international trade regulations, monopolies and consumer protection. Generally Political forces are influences that present restrictions or opportunities that are not mandatory. There is a positive outlook on the Airline Industry as long…

    • 543 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Sa Sa Case Study

    • 950 Words
    • 4 Pages

    Founded in 1978, Sa Sa has grown from a 40 sq. ft. retail space to become today's regional "beauty". According to the "Retail Asia-Pacific Top 500" ranking of Retail Asia magazine and Euromonitor in 2014 the Sa Sa holdings is a topmost company in the Hong Kong. As one of the largest sole agents in cosmetics in Hong Kong, Sa Sa represents over 100 international beauty brands in Asia. Sa Sa prospers on its successful and proven "one-stop cosmetics specialty store" concept, offering customers with…

    • 950 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Sa Sa China Analysis

    • 2344 Words
    • 10 Pages

    Introducing the Sa Sa International Holding Limited (China) Sa Sa International Holding Limited, a Hong Kong leading cosmetics retailing group in Asia. Sa Sa has approximately 220 stores and retail counters across different regions in Asia. Together with it owns brand and other international brands; Sa Sa offered over 600 brands of skin care, and fragrance, make-up and hair care products. In 2005, in order to track the fast growing trend of China Cosmetic industry, Sa Sa International Holding Limited…

    • 2344 Words
    • 10 Pages
    Good Essays
  • Satisfactory Essays

    Macro

    • 444 Words
    • 2 Pages

    Þ Political Aspect: The first factor which shall be kept in mind while studying the macro environment of Starbucks is the political aspect. It has been seen that, Starbucks has significant levels of presence in the coffee market. Starbucks consists of various types of products for government offices, corporate offices, etc. In the year 2011, Seattle Coffee has been reported a growth double digit. It shall be taken into consideration that, the volume of growth in the overall coffee market has…

    • 444 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    macros

    • 1080 Words
    • 3 Pages

    Macros are commands that symbolizes a sequence of instructions in an abbreviated form. Those instructions consist of a symbol, a name, or a key that represents a list of commands, actions, or keystrokes. A macro is a shortcut to for a task that you do repeatedly (Microsoft Word Macros). In programs like, Microsoft words, Microsoft Excel, and other programs, a macro is a saved sequence of commands or keyboard strokes that can be stored and then recalled again with a single command or keyboard stroke…

    • 1080 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Macro

    • 6861 Words
    • 28 Pages

    CHAPTER 1 INTRODUCTION Losing one’s job is the most upsetting thing that an individual can go through short of the loss of a loved one. Economists therefore consider the unemployment rate to be one of the most important indicators both of the economy and of well-being in general. When people who want and need to work cannot find suitable employment, they lose not only income but self-esteem (Robert Guell, 2003). According to Merriam-Webster Dictionary, labor is a human activity that provides…

    • 6861 Words
    • 28 Pages
    Powerful Essays
  • Satisfactory Essays

    Sa Pula Sa Puti

    • 3903 Words
    • 14 Pages

    SA PULA, SA PUTI Francisco "Soc" Rodrigo About the Author Francisco had a colorful career as politician, poet, playwright, essayist and nationalist. He is popular for his caustic comments on current events, which he writes in both English and Filipino. He is one of the foremost exponents of nationalism and was one of the writers censored and detained during the Marcos regime. He was also one of the youngest to be elected Philippine senator. CHARACTERS Kulas, an out-and-out sabungero, or cockfighting…

    • 3903 Words
    • 14 Pages
    Satisfactory Essays
  • Powerful Essays

    Macro

    • 2712 Words
    • 11 Pages

    macro ch 13 savings & investment True/False Indicate whether the statement is true or false. ____ 1. Most entrepreneurs finance their purchases of real capital using their past saving. ____ 2. To state that national saving is equal to investment, for a closed economy, is to state an accounting identity. ____ 3. Public saving is equal to national saving minus private saving. ____ 4. To state that public saving is equal to investment, for a closed economy, is to state an accounting…

    • 2712 Words
    • 11 Pages
    Powerful Essays
  • Satisfactory Essays

    SA SA COSMETICS – Analyzing Competition Sa Sa Cosmetics is a very successful Hong Kong based discount cosmetics retailers. The case describes how Sa Sa became successful, culminating in its IPO in 1997. Since then, however, its fortunes have declined somewhat. The case discusses recent initiatives that were undertaken to sustain growth momentum. Sa Sa also undertook some marketing research studies. The research findings appear to confirm that Sa Sa may have some major problems. As 2001 comes to…

    • 759 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Macro

    • 10795 Words
    • 44 Pages

    FOREIGN DIRECT INVESTMENT IN BANGLADESH, PROSPECTS AND CHALLENGES, AND ITS IMPACT ON ECONOMY by Afsana Rahman A project submitted in partial fulfillment o f the requirements for t he degree of Professional Master in Banking and Finance Examination Committee: Nationality: Previous Degree: Scholarship Donor: Dr.Winai Wongsurawat (Chairperson) Dr. S undar Venkatesh Dr. Y uo sre Badir Bangladeshi MBA in Marketing University of Dhaka Bangladesh Bangladesh Bank (Central…

    • 10795 Words
    • 44 Pages
    Good Essays