A Randomized Complete Block Design

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: FACTEX11                                            */
/*   TITLE: A Randomized Complete Block Design                  */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Design of Experiments, Factorial Designs,           */
/*   PROCS: FACTEX                                              */
/*    DATA:                                                     */
/*                                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*    MISC:                                                     */
/*                                                              */
/****************************************************************/

proc factex;
   factors Block / nlev=4;
   output out=Blocks Block nvals=(1 2 3 4) randomize(12345);
run;
   factors Treatment / nlev=6;
   output out=RCBD
          designrep=Blocks
          randomize(54321)
          Treatment cvals=('A' 'B' 'C' 'D' 'E' 'F');
run;
quit;
proc print data=RCBD;
run;