lab 2 - EXST 7005 Fall 2010 Lab #2: Data Input,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 EXST 7005 Fall 2010 Lab #2: Data Input, Combination, and Output Delivery Data Input Besides typing data into SAS directly, there are other data entry methods. Today we will learn two important methods to read data into SAS from outer sources: 1) using INFILE statement; 2) using the Import Wizard. To enter datasets of large size which are not unusual in real life, these methods are very helpful. Using INFILE statement We can input data from a txt file. For example, we want to input the following data from a txt file which is saved as ‘C:\TEMP\EXST7005\GRADE1.txt’. One thing important about it is, don’t put the variables’ names in the file. They will be input later. And keep only one space between words. Kyle 95 90 David 90 85 Mike 82 91 Sam 85 88 Jacob 77 78 Monica 79 69 Beth 63 75 Jamie 87 92 Casey 99 98 Shelly 78 74 The SAS code will be: data GRADE1; infile ‘C:\TEMP\EXST7005\GRADE1.txt’ ; input NAME $ EXAM LABAVG; run ; proc print data=GRADE1; run; Reading Files with the Import Wizard Using the Import Wizard, you can read a variety of data file types into SAS by simply choosing among menu options. Here we will introduce how to import an xls file into SAS.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 NAME EXAM LABAVG Kelly 94 90 Amy 88 85 Ryan
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/29/2011 for the course EXST 7005 taught by Professor Geaghan,j during the Fall '08 term at LSU.

Page1 / 3

lab 2 - EXST 7005 Fall 2010 Lab #2: Data Input,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online