Search notes:

SAS statements: do (iterative)

items

data _null_;

  /* Without declaring the lenght of day,
     day names would be cut after the sixth
     character because 'Monday' would initialize
     the length to 6. Or so... */
  length day $ 9;

  do day='Monday','Tuesday','Wednesday', 'Thursday', 'Friday';
     put day;
  end;
  
run;
Github repository about-SAS, path: /programming/statements/do/iterative/items.sas

compound loop specification

data _null_;

  do i = 10 to 12,
         19, 20, 21,
          5 to 25 by 6;

     put i=;
  end;

run;
Github repository about-SAS, path: /programming/statements/do/iterative/compound-loop-specification.sas

See also

SAS statements

Index