Search notes:

SAS statements: select

data tq84_data;
  
  length rom $5;

  do num = 1 to 5;

     select (num); /* Note the semicolon ! */
       when (  1) rom = 'I'  ;
       when (  2) rom = 'II' ;
       when (  3) rom = 'III';
       when (  4) rom = 'IV' ;
       when (  5) rom = 'V'  ;
     end;
     output;
     
  end;

run;

proc print data=tq84_data;
run;
Github repository about-SAS, path: /programming/statements/select/when.sas

See also

SAS statements

Index