SAS OnlineTutorback||next

Try It! Examine variable values in a DO loop.

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).
    data work.earn;
       Value=2000;
       do year=1 to 20;
          Interest=value*.075;
          value+interest;
       end;
    run;
    Include a PUT statement in the DO loop to write the value of the index variable Year to the log during each iteration of the DO loop.

  2. Submit the program.

  3. Note the last value of year written to the log.

    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