Preview

Macros in Sas

Satisfactory Essays
Open Document
Open Document
389 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Macros in Sas
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

    Chapter 20 lab

    • 284 Words
    • 2 Pages

    4. What does dnl stand for in the m4 macro language; what are dnl commands used for?…

    • 284 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    This week learning assignment is based on Unit 8 Chapter 6 reading of the textbook about the elements of a computing system that focus on the selections relevant for supporting programs with symbols.…

    • 288 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    This paper will describe the variable naming rules of three different programming languages. These three languages are Visual Basic, Python, and Java. Each of these languages has different rules that apply to them and some similarities. I will describe the rules and the similarities and differences in the next few paragraphs.…

    • 878 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Today’s lecture will be spent entirely in the computer lab. At the end of lab, submit this worksheet.…

    • 581 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Macro – A pattern that instructs how an input sequence should be mapped to coincide with a replacement input sequence.…

    • 437 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    5. Bullets and Borders from with Word or online is available and can be used to decorate the document and any important points you want to make…

    • 488 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Macro Unit 2 Lesson 1

    • 3639 Words
    • 15 Pages

    You can only count the final goods: goods and services being purchased for final use and not for resale…

    • 3639 Words
    • 15 Pages
    Good Essays
  • Good Essays

    Bis 220 Wk 8 Checkpoint

    • 572 Words
    • 3 Pages

    W. Russell (2013). Review of Corel Presentations X3. Retrieved on May 1, 2013 from http://presentationsoft.about.com/od/softwarereviews/fr/corel_presx3.htm…

    • 572 Words
    • 3 Pages
    Good Essays
  • Good Essays

    * A number or set of commands, which is saved in a macro file. This can be useful for completing tasks which require the same repetitive action with different inputs.…

    • 669 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Macro Examples

    • 1120 Words
    • 5 Pages

    2. The area where macro code is displayed in Visual Basic is called the Project Explorer Window.…

    • 1120 Words
    • 5 Pages
    Good Essays
  • Better Essays

    In addition, assembly language allows programmers to utilize symbolic addresses to replace numeric memory addresses in binary bits to execute a command or input data. Computer specialist can link symbolic labels to an instruction or piece of data in the program. In other words, the symbolic label turns into a permanent tag for the instruction or piece of data disregarding where it populates in the program or where it relocates in the memory. However, machine language is more complicated. To perform an instruction or input data in the memory in a specific location, the computer specialist must specify the direct address. For example, “In machine language, to jump to the instruction stored in memory location 18, you must specify directly to address 18 (write JUMP…

    • 2002 Words
    • 9 Pages
    Better Essays
  • Satisfactory Essays

    Sas Primary Assignment

    • 601 Words
    • 3 Pages

    SAS currently has many benefits for their employees; a 35 hour work week, family life work balance, on site medical, generous family oriented benefits, low turnover in a high turnover industry and a general belief that "if your treat employees as if they make a difference to the company, they will make a difference to the company." Due the these cultural benefits within SAS we have made an environment which can attract and retain the best talent translating the the best stress free talent made available to our very loyal customers. This is truly a case where happy employees has meant happy customers. Right now we live in an "oasis of calm" free from the stresses of frantic competition, signing bonuses…

    • 601 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Macro Change

    • 3184 Words
    • 13 Pages

    Swain County, D. N. (2005). School Social Work. Retrieved November 8, 2012, from Swain County Department of Social Services: http://www.swaincountydss.org/children/school.html…

    • 3184 Words
    • 13 Pages
    Powerful Essays
  • Good Essays

    Sas If Then Else

    • 1347 Words
    • 6 Pages

    Using IF THEN ELSE statements, LENGTH is to be use so that the new coloum create (Patient) will have defined length that is $12.…

    • 1347 Words
    • 6 Pages
    Good Essays
  • Good Essays

    Macro Assignment 2

    • 994 Words
    • 3 Pages

    1. If you were having a conversation with a Keynesian and a Classical economist, and the conversation turned to why the economy is experiencing high unemployment and what the government should do about it, how would each economist explain unemployment and what policies would each advocate?…

    • 994 Words
    • 3 Pages
    Good Essays