SAS OnlineTutorback||next

Try It! Using the Act.Talent data set, test various automatic macro variables.

Creating HTML output? Read this first.

  1. Copy the program below and paste it into the Program Editor window (or issue the command copy sashelp.oltutor..source). Submit the program and view the output.
    title1 'Temporary Employees for 1999';
    title2 "as of &sysdate9";
    data work.talent99;
       set act.talent;
       opsystem="&sysscp";
       if year(lasthired)=1999;
       format birthdate lasthired date.;
    run;
    proc print data=work.talent99;
    run; 
    

  2. Recall the code and add or modify statements to reference other macro variables. (Refer to the table below.) Submit and view the new output.

    Name Information Supplied
    SYSDATE9 date the job or session began executing
    SYSDATE date the job or session began executing
    SYSDAY weekday the job or session began executing
    SYSTIME time the job or session began executing
    SYSSCP operating system abbreviation
    SYSVER SAS software version and/or release number
    SYSLAST name of the most recently created data set

  3. Cancel the TITLE statements.

    Return here and select Next.

Solution

back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA.
All rights reserved.

Terms of Use & Legal Information | Privacy Statement