Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The GAGE Application

Creating a Data Set Outside the GAGE Application

Note: This section assumes you have some knowledge of creating SAS data sets.

Suppose your gage study data are stored in an external file, and you want to use the GAGE application but do not want to type in the data. How do you create a SAS data set that can be read by the GAGE application?

Table A.2 lists the SAS variables needed for the general information and the measurements in a GAGE data set.

Table A.2: GAGE Data Set Variables
  Variable
Description Name Type Length Values
Test IDTESTIDcharacter8 
DateDATEnumeric8 
Performed ByWHOcharacter30 
Part No. & NamePARTcharacter20 
CharacteristicsCHARcharacter20 
SpecificationSPECcharacter20 
Gage NameGAGENAMEcharacter20 
Gage No.GAGENOcharacter20 
Gage TypeGAGETYPEcharacter20 
Sigma MultipleSPREADnumeric84, 5.15, 6
AnalysisPTYPEcharacter1T, V
ToleranceTOLnumeric8 
Operator (condition)CONDITNcharacter8 
PartSAMPLEnumeric81 -15
Trial 1TRIAL1numeric8 
Trial 2TRIAL2numeric8 
Trial 3TRIAL3numeric8 
Trial 4TRIAL4numeric8 

A GAGE data set must have one observation for each combination of values of CONDITN and PART. You can have up to four operators (values of CONDITN), and each must be assigned a unique value. The MMDDYY8. format must be associated with the DATE variable. A PTYPE value of V indicates that you want a percent of process variation analysis. A PTYPE value of T indicates that you want a percent of tolerance analysis. The variable TOL must be assigned a tolerance value when PTYPE = T.

Return to the gasket thickness gage example described on page *. Assume you are using the SAS System under Microsoft Windows, and the gasket thicknesses are stored in the external file c:\gage\gthick.dat. A partial listing of the data in gthick.dat is as follows:

   Columns: 0----+----1----+----2----+----3
             George    1   0.65      0.6
             George    2   1.0       1.0
             George    3   0.85      0.8
             George    4   0.85      0.95
                         .
                         .
                         .
             Robert    7   0.95      0.95
             Robert    8   0.8       0.8
             Robert    9   1.05      1.05
             Robert   10   0.85      0.8

The following statements read the data into a GAGE SAS data set named SASUSER.GASKET. The LENGTH statement guarantees that each variable is represented in the data set. For the GAGE application to identify the data set as valid, the TYPE and ALTER data set options must be specified as shown.

   data sasuser.gasket (type=_GRR alter=_GAGE);
      length testid $8 date 8 who $30 part char spec gagename
             gageno gagetype $20 spread 8 ptype $1 tol 8
             conditn $8 sample trial1 trial2 trial3 trial4 8;
      format date mmddyy8.;
      retain testid   'Gasket'         date     '12apr94'd
             who      'John Smith'     part     'Gasket'
             spec     '0.6-1.0 mm'     gagename 'Thickness'
             gageno   'X-2034'         gagetype '0-10 mm'
             spread   5.15             ptype    'T'
             tol      0.4;
      infile 'c:\gage\gthick.dat';
      input conditn $ 1-8 sample 10-11 trial1 15-18
            trial2 25-28;
   run;

Figure A.6 is a partial listing of the SAS data set SASUSER.GASKET.

OBS TESTID DATE WHO PART CHAR SPEC GAGENAME GAGENO GAGETYPE

1 Gasket 04/12/94 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 2 Gasket 04/12/94 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 3 Gasket 04/12/94 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 4 Gasket 04/12/94 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm

OBS SPREAD PTYPE TOL CONDITN SAMPLE TRIAL1 TRIAL2 TRIAL3 TRIAL4

1 5.15 T 0.4 George 1 0.65 0.60 . . 2 5.15 T 0.4 George 2 1.00 1.00 . . 3 5.15 T 0.4 George 3 0.85 0.80 . . 4 5.15 T 0.4 George 4 0.85 0.95 . . . . .

OBS TESTID DATE WHO PART CHAR SPEC GAGENAME GAGENO GAGETYPE

27 Gasket 04/12/94 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 28 Gasket 04/12/94 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 29 Gasket 04/12/94 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 30 Gasket 04/12/94 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm

OBS SPREAD PTYPE TOL CONDITN SAMPLE TRIAL1 TRIAL2 TRIAL3 TRIAL4

27 5.15 T 0.4 Robert 7 0.95 0.95 . . 28 5.15 T 0.4 Robert 8 0.80 0.80 . . 29 5.15 T 0.4 Robert 9 1.05 1.05 . . 30 5.15 T 0.4 Robert 10 0.85 0.80 . .

Figure A.6: The SAS Data Set SASUSER.GASKET

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.