Thursday, October 28, 2010

Create FORMAT library from a SAS dataset

data fmt(keep=fmtname start label);
      set temp;
      fmtname="TRTFMT";
      start=trtgrp;
      label=trtlbl;
run;

proc format library=work cntlin=fmt;
run;

=================
TEMP:
trtgrp      trtlbl
1            Treatment 1
2            Treatment 2
3            Placebo