Specifying Control Limit Info for R Chart

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SHWREX2                                             */
/*   TITLE: Specifying Control Limit Info for R Chart           */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Shewhart Charts, R Charts,                          */
/*   PROCS: SHEWHART                                            */
/*    DATA:                                                     */
/*                                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*                                                              */
/****************************************************************/

data Disks2;
   input Lot @;
   do i=1 to 6;
      input Time @;
      output;
   end;
   drop i;
   datalines;
26 7.93 7.97 7.89 7.81 7.88 7.92
27 7.86 7.91 7.87 7.89 7.83 7.87
28 7.93 7.95 7.90 7.89 7.88 7.90
29 7.97 8.00 7.86 7.89 7.84 7.78
30 7.91 7.93 7.98 7.93 7.83 7.88
31 7.85 7.94 7.88 7.98 7.96 7.84
32 7.86 8.01 7.88 7.95 7.90 7.89
33 7.87 7.93 7.96 7.89 7.81 8.00
34 7.87 7.97 7.95 7.89 7.92 7.84
35 7.92 7.97 7.90 7.88 7.89 7.86
36 7.96 7.90 7.90 7.84 7.90 8.00
37 7.92 7.90 7.98 7.92 7.94 7.94
38 7.88 7.99 8.02 7.98 7.88 7.92
39 7.89 7.91 7.92 7.90 7.94 7.94
40 7.84 7.88 7.91 7.98 7.87 7.93
41 7.91 7.87 7.96 7.91 7.89 7.92
42 7.96 7.93 7.86 7.93 7.86 7.94
43 7.84 7.82 7.87 7.91 7.91 8.01
44 7.93 7.91 7.92 7.88 7.91 7.86
45 7.95 7.92 7.93 7.90 7.86 8.00
;


data Dlimits2;
   length _var_ _subgrp_ _type_ $8;
   _var_    = 'Time';
   _subgrp_ = 'Lot';
   _type_   = 'STANDARD';
   _limitn_ = 6;
   _lclr_   = .03;
   _r_      = .12;
   _uclr_   = .25;
run;

ods graphics on;
title 'Specifying Control Limit Information';
proc shewhart data=Disks2 limits=Dlimits2;
   rchart Time*Lot / odstitle=title;
run;

data Dlimits3;
   length _var_ _subgrp_ _type_ $8;
   _var_    = 'Time';
   _subgrp_ = 'Lot';
   _stddev_ = .045;
   _limitn_ = 6;
   _type_   = 'STDSIGMA';
run;

title 'Specifying Control Limit Information';
proc shewhart data=Disks2 limits=Dlimits3;
   rchart Time*Lot / nolimit0 odstitle=title;
run;