Scenario 4

Directions

This scenario uses the Certadv.All data set. Write a SAS program that does the following:
  • Create a footnote that contains the text 'Printed on ' followed by the current date obtained using a SAS function, and formatted month, day, year (for example, 'Printed on July 30, 2019').
  • Create a macro named Test that does the following:
    • accepts two keyword parameters, Vars and Dsn
    • produces a PROC PRINT report from the data set specified in the Dsn parameter, which contains only the columns specified in the Vars parameters and only the rows that have a Begin_Date of 21774
    • calls the Test macro, with the Dsn value of Certadv.All and a Vars value of Course_Code and Fee

Test Your Code

  1. How many observations are in the output?
  2. Are all the values for Course_Code C004?

Exam Objective

  • Automate programs by defining and calling macros using the SAS macro language.
  • Use macro functions.
Last updated: October 16, 2019
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset