You can read defect counts for subgroup samples from a DATA= data set specified in the PROC SHEWHART statement. Each process specified in the UCHART statement must be a SAS variable in the data set.
The following statements create a data set containing the number of flaws per shirt and the number of shirts per box: title 'Average Defects Per Tee Shirt'; proc shewhart data=shirts2; uchart ...