THE MCHP SAS PC WORKSHOP MANUAL - Computer Files




Home    Contents

GENERAL GUIDELINES:
Windows in SAS
File management

The SAS Program
Program syntax
Debugging tips


 USING SAS PROGRAMMING TO: 
   
1. Prepare the data set 
   Types of data 
   Example programs    
    
2. View the data
   SAS Procedures
  
3. Explore the data  
   Numeric statistics    
   Frequency tables    
    
4. Manipulate the data  
   Basic techniques    
   New variables
  
5. Adding Variables and 
Observations to Data Sets
   The SET Statement
   The MERGE Statement

6. Data Processing
   ARRAY Statement
   Do Loops
   By-Group Processing
   RETAIN Statement
  
NON-PROGRAMMING 
      Alternatives

 
SAMPLE DATA SETS: 
 Height/weight
 Height/weight/region
 Simulated clinical data 
 Simulated Manitoba Health 
    

Computer Files for the Simulated Manitoba Health Data Set

The following computer files are available from MCHP. Note that results may occasionally display truncated labels, depending on the procedure. It is important to ensure, within the SAS program, that the file name is correctly specified to permit SAS to read the file.

File NameSize Format NameDescription
fivet93m.raw460,000 not applicable data set containing values for 5,000 observations and 33 variables.
dx93xfmt.sas34,039$DIAGXL value labels for 3-digit ICD-9-CM diagnoses (1980).
op93fmt.sas29,371$OPL value labels for 4-digit ICD-9-CM procedures (1980).
cmg93fmt.sas23,285 $CMGL value labels for CMGs (Case Mix Groups) (1991).
drg93fmt.sas21,058$DRGL value labels for DRGs (Diagnosis Related Groups)(5th revision).
fmts95.sas3,132assorted value labels for other variables in the data set.
lbls93.sas2,270not applicable variable labels

The following is an example of how to use some of the above files in a SAS program; it assumes that the temporary SAS data set "test" has already been created from the raw Manitoba Health data:

%include 'a:\dx93xfmt.sas';   
%include 'a:\op93fmt.sas';
%include 'a:\cmg93fmt.sas';
%include 'a:\drg93fmt.sas';

  /* add a new variable to the test data set */
 
data test;   
  set test;

  /* keep only the first 3 digits in the new diag3c variable */
  /* from the 5-digit variable diag01 */

  diag3c=substr(diag01,1,3);   
run;                            

proc freq data=test;
           /* obtain frequencies of 4 variables */
  tables diag3c op01 drg cmg;  
          /* display the values in formatted form*/
  format diag3c $diagxl. op01 $opl. 
            cmg $cmgl. drg $drgl.;
run;

Contact: Charles Burchill       Telephone: (204) 789-3429
Manitoba Centre for Health Policy
Department of Community Health Sciences, University of Manitoba
4th floor Brodie Centre
408 - 727 McDermot Avenue
Winnipeg, Manitoba R3E 3P5       Fax: (204) 789-3910
Last modified on Wednesday, 24-Aug-2005 13:43:08 CDT