Lab04_Fall2010

Lab04_Fall2010 - EXST 7003 Lab 04 Fall 2011 EXST 7003, Lab...

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

View Full Document Right Arrow Icon
EXST 7003 Lab 04 Fall 2011 EXST 7003, Lab 04: Working with External Data Files in SAS Week 5: September 19-23 DUE: September 27 th (Section 1) or September 30 th (Section 2 and 3) The Program The program which will be utilized in this lab, which each student will individually write, refer to, and answer questions about, is provided below. This program is discussed herein, and will be presented during lab. dm 'log;clear;output;clear'; OPTIONS nodate nocenter pageno=1 ls=78 ps=55; Title1 'EXST 7003 Lab 4'; Title2 'Your name'; DATA one; INFILE 'H:\shoedata_Lab_4.csv' DLM=","; LENGTH region $ 25 product $ 15 subsidiary $ 15; INPUT region $ product $ subsidiary $ stores sales inventory returns; ID = _N_; RUN; ODS RTF FILE='C:\Documents and Settings\PAWS_ID\output04.doc' PROC CONTENTS data=one; Title3 'Proc CONTENTS of data set one'; RUN; PROC PRINT data=one; Title3 'Proc print of first 10 data lines from file'; WHERE ID<=10; RUN; PROC UNIVARIATE data=one; VAR sales; Title3 'Proc univariate analysis of Sales data'; RUN; ODS RTF CLOSE; QUIT; The data The data set to be utilized for this week’s lab consists of sales, inventory, and returns data for a large, multi-national department store (e.g. Macy’s). The data set has been stored as a file, separate and external to the SAS program, much like the file that was utilized in last week’s lab. This file was originally stored as a Microsoft Excel spreadsheet file, but was converted into a comma separated values (CSV) file which will be read in by the SAS software package using a suitable statement structure. A CSV file is an ordinary ASCII-text (can be read by Windows Notepad) file, wherein individual values are separated by specified diacritical marks [in this case, commas (,)]. SAS is capable of reading other similar files; however, these files must be written in ASCII-text format (to check this, you can – and should – always try and open your file from a given text file reader, like Windows Notepad). This technique provides an easy way to have the SAS software read a lengthy or complex data file for processing; it is a technique which is most 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
EXST 7003 Lab 04 Fall 2011 useful, especially for the analysis of complex research or field data. Note that it is necessary and imperative that the desired file exists on a drive and folder the SAS software can access. This data is similar to the department store data used in Lab 2; however, it is the full data set, having approximately 200 records (underlining the applicability of the process of having SAS read the data in from the external file) across several continents and countries. Reading external files into the SAS software
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/28/2011 for the course EXST 7003 taught by Professor Moser,e during the Fall '08 term at LSU.

Page1 / 4

Lab04_Fall2010 - EXST 7003 Lab 04 Fall 2011 EXST 7003, Lab...

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