np Charts-Specifying Control Limit Info

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

data Circuits;
   input Batch Fail @@;
   datalines;
1    5   2   6   3  11   4   6    5   4
6    9   7  17   8  10   9  12   10   9
11   8  12   7  13   7  14  15   15   8
16  18  17  12  18  16  19   4   20   7
21  17  22  12  23   8  24   7   25  15
26   6  27   8  28  12  29   7   30   9
;


data Climits1;
   length _var_ _subgrp_ _type_ $8;
   _var_    = 'Fail';
   _subgrp_ = 'Batch';
   _limitn_ = 500;
   _type_   = 'STANDARD';
   _lclnp_  =  0;
   _np_     = 10;
   _uclnp_  = 20;
run;

ods graphics on;
title 'Specifying Control Limit Information';
proc shewhart data=Circuits limits=Climits1;
   npchart Fail*Batch / subgroupn = 500
                        odstitle  = title
                        markers;
run;

data Climits2;
   length _var_ _subgrp_ _type_ $8;
   _var_    = 'Fail';
   _subgrp_ = 'Batch';
   _limitn_ = 500;
   _type_   = 'STANDARD';
   _p_      = .02;
run;

title 'Specifying Control Limit Information';
proc shewhart data=Circuits limits=Climits2;
   npchart Fail*Batch / subgroupn = 500
                        odstitle  = title;
run;