SAS OnlineTutorback||next

Try It! Using the Act.Talent99 data set, correct errors in macro variable references.

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).
    %let number=11;
    %let name=November;
    %let abbrev=nov;
    %let year=99;
    data &abbrev.hire;
       set act.talent&year end=final;
       if month(lasthired)=&number then
       do;
          Fee=rate*.10;
          TotFee+fee;
          output;
       end;
       format lasthired date9.;
       if final then call symput
          ('sumfee',put(totfee,dollar6.));
       title1 "Actors Hired in &name";
       title2 "Agency Commission &sumfee";
       footnote1 "Report Number &number";
    proc print data=&abbrev.hire;
    run; 
    
    Submit the program. Note that the variable, which is created with the CALL SYMPUT routine SUMFEE, does not resolve.

  2. Recall the program and modify it to force the execution of the DATA step before the TITLE and FOOTNOTE statements are processed. Submit and view the output.

    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