Lab03_Fall2011

Lab03_Fall2011 - EXST 7003 Lab 03 Fall 2011 EXST 7003, Lab...

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

View Full Document Right Arrow Icon
EXST 7003 Lab 03 Fall 2011 EXST 7003, Lab 03: More SAS Week 4: September 12-16 DUE: September 20 (section 1) or September 23 (section 2 and 3) Reading External Raw Data Files With extremely large data sets it is often easier to enter the data from an external file than directly in the SAS program. Raw data files are referred to text, ASCII, sequential, or flat files which can be viewed using simple text editors and have no program associated with them. So spreadsheet files are examples of data files that are NOT raw data. Data sets should then be saved as text files only (typically end in the extension .txt ) You can also change these extensions later on if you prefer to (i.e .dat) Using Excel Type in the data, with one piece of data per cell. Once finished, click on the File menu bar at the top of the screen. Click on the Save As command. In the upper bar of the window you can change the location where you want your file to be saved (save on your H:\ drive). In the File name bar, you can name your file (called the file path ). In the Save as type bar, you can choose the type of file you want to save (you will generally save as Text (Tab delimited) whenever creating SAS data files). Once you have saved you can close Excel. You will get a message stating that "the selected file type does not support work books that contain multiple sheets", just click OK and the file will be all right. Just exit Excel, and your data set is ready to be input in SAS. Input of Data from an External File data _____; infile 'path'; input _____; run; Attention : when I type _____ this indicates a blank where you will need to fill in something (data set names, or variable names). Simply choose your data set name as you would normally do.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/28/2011 for the course EXST 7003 taught by Professor Moser,e during the Fall '08 term at LSU.

Page1 / 4

Lab03_Fall2011 - EXST 7003 Lab 03 Fall 2011 EXST 7003, Lab...

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

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