Lab02_Fall2011

Lab02_Fall2011 - EXST 7003 Lab 02 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 02 Fall 2011 EXST 7003, Lab 02: Introduction to SAS Libraries, SAS Proc MEANS and Proc CHART Week 3: September 5-9 DUE: September 13 th (Section 1) or September 16 th (Section 2 or 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 2'; Title2 'Your name'; LIBNAME MyData ‘C:\Documents and Settings\PAWS_ID\’; DATA MyData.one; INPUT Product $ Subsidiary $ Stores Sales Inventory Returns; DATALINES; MCasual Chicago 26 409 832 179 MDress Chicago 28 262 824 89 WCasual Chicago 11 172 475 54 WDress Chicago 37 293 754 10 MCasual Minneapolis 16 264 565 100 MDress Minneapolis 22 236 624 7 WCasual Minneapolis 7 111 287 3 WDress Minneapolis 27 224 761 6 MCasual NewYork 20 457 890 13 MDress NewYork 18 192 658 5 WCasual NewYork 10 179 438 4 WDress NewYork 17 289 1120 10 RUN; ODS RTF FILE='C:\Documents and Settings\PAWS_ID\Lab02.doc'; PROC CONTENTS data=MyData.one; RUN; PROC PRINT data=MyData.one LABEL; Title3 'Printout of data'; BY Subsidiary; LABEL Sales = 'Sales, in $thousands' Inventory = 'Inventory, in $thousands' Returns = 'Returns, in $thousands'; VAR Subsidiary Product Sales Inventory Returns; RUN; PROC PRINT data=MyData.one LABEL; Title3 'Printout of data of Chicago'; WHERE Subsidiary = 'Chicago'; LABEL Sales = 'Sales, in $thousands' Inventory = 'Inventory, in $thousands' Returns = 'Returns, in $thousands'; VAR Subsidiary Product Sales Inventory Returns; RUN; PROC MEANS data=MyData.one N MEAN MIN MAX RANGE STDERR VAR SKEW P25 P50 P75; Title3 'Proc MEANS output'; 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 02 Fall 2011 VAR Sales Inventory Returns; CLASS Subsidiary; RUN; PROC GCHART data=MyData.one; Title3 'Horizontal chart of inventory data by subsidiary'; HBAR Inventory; BY Subsidiary; RUN; PROC GCHART data=MyData.one; Title3 'Vertical chart of sales data by subsidiary'; VBAR Sales; BY Subsidiary; RUN; ODS RTF CLOSE; QUIT; SAS Libraries and the LIBNAME Statement A SAS library is, in computer terminology, a pointer to a location on the disk where the referenced SAS data set is stored. In other words, a SAS library is a set of directions SAS uses to find a given SAS data set in a folder on a floppy disk, or the hard drive, or your TigerBytes accounts – a library tells SAS where to look to find your data. There are two different libraries which will be important in working with SAS. The first such library is the Work library, or the default library. It is the library SAS uses to store data sets in, if an alternative is not specified. It is important to note that, upon closing the SAS Desktop Environment, all data sets stored within the Work library are automatically deleted. The other important library is the one(s) that are user-created and specified via the LIBNAME statement(s) in a SAS program. These user-created libraries operate the same as the
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 / 6

Lab02_Fall2011 - EXST 7003 Lab 02 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