Input Data Sets
You can read the number of nonconformities in
subgroup samples from a DATA= data set specified in the
PROC SHEWHART statement.
Each process specified in the CCHART statement must
be a SAS variable in the data set.
This variable provides the number of nonconformities
in subgroup samples indexed by the subgroupvariable.
Typically (but not necessarily), the subgroup consists of a single
inspection unit.
The subgroupvariable, specified in the CCHART statement,
must also be a SAS variable in the DATA= data set.
Each observation in a DATA= data set must contain
a value for each process and a value for the
subgroupvariable.
The data set must contain one observation per subgroup.
Other variables that can
be read from a DATA= data set include
 _PHASE_ (if the READPHASES= option is specified)
 blockvariables
 symbolvariable
 BY variables
 ID variables
By default, the SHEWHART procedure reads all of the observations in a
DATA= data set. However, if the data set includes the variable
_PHASE_, you can read selected groups of observations (referred to
as phases) with the READPHASES= option
(for an example, see "Displaying Stratification in Phases" ).
For an example of a DATA= data set, see
"Creating c Charts from Defect Count Data" .
You can read preestablished control limits (or parameters from which
the control limits can be calculated) from a LIMITS= data set
specified in the PROC SHEWHART statement. For example, the following
statements read control limit information from the data set
CONLIMS:^{*}
proc shewhart data=info limits=conlims;
cchart defects*lot;
run;
The LIMITS= data set can be an OUTLIMITS= data set that was created in
a previous run of the SHEWHART procedure. Such data sets always
contain the variables required for a LIMITS= data set. The LIMITS=
data set can also be created directly using a DATA step.
When you create a LIMITS= data set, you must provide
one of the following:
 the variables _LCLC_, _C_, and _UCLC_,
which specify the control limits
 the variable _U_, which is used
to calculate the control limits (see
"Control Limits"
)
In addition, note the following:
 The variables _VAR_ and _SUBGRP_ are required.
These must be character variables of length 8.
 The variable _INDEX_ is required if you specify the
READINDEX= option; this must be a character variable
of length 16.
 The variables _LIMITN_, _SIGMAS_ (or _ALPHA_), and
_TYPE_ are optional, but they are recommended to maintain
a complete set of control limit information.
The variable _TYPE_ must be a character variable of length
8; valid values are ESTIMATE and STANDARD.
 BY variables are required if specified with a BY statement.
For an example, see "Reading Preestablished Control Limits" .
You can read subgroup summary statistics from
a HISTORY= data set specified in the PROC SHEWHART statement.
This allows you to reuse OUTHISTORY= data
sets that have been created in previous runs of the SHEWHART
procedure or to create your own HISTORY= data set.
A HISTORY= data set used with the CCHART statement
must contain the following variables:
 subgroupvariable
 subgroup number of nonconformities per unit variable
for each process
 subgroup sample size variable (number of units per subgroup)
for each process
The names of the subgroup number of
nonconformities per unit and subgroup sample size variables
must be the process name concatenated with the
special suffix characters U and N, respectively.
For example, consider the following statements:
proc shewhart history=summary;
cchart (flaws ndefects)*lot;
run;
The data set SUMMARY must include the variables LOT, FLAWSU,
FLAWSN, NDEFCTSU, and NDEFCTSN.
Note that if you specify a process name that contains eight
characters, the names of the summary variables must
be formed from the first four
characters and the last three characters of the process
name, suffixed with the appropriate character.
Other variables that can be read from a HISTORY= data set include
 _PHASE_ (if the READPHASES= option is specified)
 blockvariables
 symbolvariable
 BY variables
 ID variables
By default, the SHEWHART procedure reads all
the observations in a HISTORY= data set.
However, if the data set includes the
variable _PHASE_, you can read selected groups of observations
(referred to as phases) with the READPHASES= option
(see "Displaying Stratification in Phases"
for an example).
For an example of a HISTORY= data set,
see "Creating c Charts from Nonconformities per Unit" .
You can read summary statistics and control limits from
a TABLE= data set specified in the PROC SHEWHART statement.
This enables you to reuse an OUTTABLE= data set created
in a previous run of the SHEWHART procedure or to
create your own TABLE= data set.
Because the SHEWHART procedure
simply displays the information in a TABLE= data set, you can
use TABLE= data sets to create specialized control charts.
Examples are provided in Chapter 49, "Specialized Control Charts."
The following table lists the variables required in a TABLE= data set
used with the CCHART statement:
Table 33.23: Variables Required in a TABLE= Data Set
Variable

Description

_C_  average number of nonconformities 
_LCLC_  lower control limit for nonconformities 
_LIMITN_  nominal sample size associated with the control limits 
subgroupvariable  values of the subgroupvariable 
_SUBC_  subgroup number of nonconformities 
_SUBN_  subgroup sample size 
_UCLC_  upper control limit for nonconformities 
Other variables that can be read from a TABLE= data set include
 blockvariables
 symbolvariable
 BY variables
 ID variables
 _PHASE_ (if the READPHASES= option is specified).
This variable must be a character variable of length 16.
 _TESTS_ (if the TESTS= option is specified). This variable
is used to flag tests for special causes and must be
a character variable of length 8.
 _VAR_. This variable is
required if more than one process is specified
or if the data set contains information for more
than one process. This variable must be a character
variable of length 8.
For an example of a TABLE= data set,
see "Saving Control Limits" .
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.