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 ID

TESTID

character

8

 

Date

DATE

numeric

8

 

Performed By

WHO

character

30

 

Part No. & Name

PART

character

20

 

Characteristics

CHAR

character

20

 

Specification

SPEC

character

20

 

Gage Name

GAGENAME

character

20

 

Gage No.

GAGENO

character

20

 

Gage Type

GAGETYPE

character

20

 

Sigma Multiple

SPREAD

numeric

8

4, 5.15, 6

Analysis

PTYPE

character

1

T, V

Tolerance

TOL

numeric

8

 

Operator (condition)

CONDITN

character

8

 

Part

SAMPLE

numeric

8

1–15

Trial 1

TRIAL1

numeric

8

 

Trial 2

TRIAL2

numeric

8

 

Trial 3

TRIAL3

numeric

8

 

Trial 4

TRIAL4

numeric

8

 


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 in the section Getting Started. 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     '17apr02'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.26 is a partial listing of the SAS data set SASUSER.GASKET.

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

OBS TESTID DATE WHO PART CHAR SPEC GAGENAME GAGENO GAGETYPE

1 Gasket 04/17/02 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 2 Gasket 04/17/02 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 3 Gasket 04/17/02 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 4 Gasket 04/17/02 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/17/02 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 28 Gasket 04/17/02 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 29 Gasket 04/17/02 John Smith Gasket 0.6-1.0 mm Thickness X-2034 0-10 mm 30 Gasket 04/17/02 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 . .