Before you run the examples, open the zip file under the Downloads tab. Using the list below, create the folders and copy the data files so that the data are available during your SAS session.
Create the folder c:\MyRawData and copy these files to it:
Address.dat IceCreamSales.dat Shakespeare.dat Admit.dat IceCreamSales2.dat Shoe.dat AllScores.dat Lengths.dat Shoesales.dat Artists.dat Library.dat South.dat Baseball.dat LibraryBooks.dat Speed.dat Basketball.dat Mag.dat Survey.dat Boats2.dat Mens5000.dat Temperature.dat Boats.dat Mountains.dat Temps.dat Books.dat Movies.dat ToadJump.dat Bus.dat NatPark.Dat Tomatoes.dat Candy.dat NewAdmit.dat Traffic.dat Cars.dat North.dat Train.dat Choc.dat Olympic1500.dat Transpos.dat Chocolate.dat OnionRing.dat TropicalSales.dat Chocsales.dat Onions.dat UsedCars.dat Coffee.dat OrdersQ3.dat Walk.dat Criterium.dat Parks.dat WBRK.dat CustAddress.dat Picbooks.dat Zoo.dat Disc.dat Precipitation.dat Exercise.dat President.dat Bands.csv Flowers.dat Pumpkin.dat Bands2.csv Games.dat Records.dat Women.csv Garden.dat Scores.dat Home.dat SeaLife.datCreate the folder c:\MyFiles and copy this file to it: Baseball.xls
Create the folder c:\MyWebLogs and copy this file to it: dogweblogs.txt
Create the folder c:\MyExcelFiles and copy these files to it: Baseball.xls, OnionRing.xls
Create the folder c:\MyData to store files when you run examples
Create the folder c:\MyHTML to store files when you run examples
Create the folder c:\MyHTMLFiles to store files when you run examples
Create the folder c:\MyPDFFiles to store files when you run examples
Create the folder c:\MyRTFFiles to store files when you run examples
Create the folder c:\MySASLib and copy this file to it: TropicalSales.dat
Program (page 327)
LIBNAME sports 'c:\MySASLib'; PROC SQL; CREATE TABLE sports.customer (CustomerNumber num, Name char(17), Address char(20)); INSERT INTO sports.customer VALUES (101, 'Murphy''s Sports ', '115 Main St. ') VALUES (102, 'Sun N Ski ', '2106 Newberry Ave. ') VALUES (103, 'Sports Outfitters', '19 Cary Way ') VALUES (104, 'Cramer & Johnson ', '4106 Arlington Blvd.') VALUES (105, 'Sports Savers ', '2708 Broadway '); TITLE 'The Sports Customer Data'; SELECT * FROM sports.customer;
Program (page 328)
LIBNAME sports 'c:\MySASLib'; DATA sports.customer; INPUT CustomerNumber Name $ 5-21 Address $ 23-42; DATALINES; 101 Murphy's Sports 115 Main St. 102 Sun N Ski 2106 Newberry Ave. 103 Sports Outfitters 19 Cary Way 104 Cramer & Johnson 4106 Arlington Blvd. 105 Sports Savers 2708 Broadway ; PROC PRINT DATA = sports.customer; TITLE 'The Sports Customer Data'; RUN;
First Program (page 329)
LIBNAME sports 'c:\MySASLib'; PROC SQL; TITLE 'Customer Number 102'; SELECT * FROM sports.customer WHERE CustomerNumber = 102;Second Program (page 329)
LIBNAME sports 'c:\MySASLib'; DATA sunnski; SET sports.customer; IF CustomerNumber = 102; PROC PRINT DATA = sunnski; TITLE 'Customer Number 102'; RUN;
Program (page 331)
LIBNAME sports 'c:\MySASLib'; DATA outfitters; SET sports.customer; IF Name = 'Sports Outfitters'; PROC PRINT DATA = outfitters; RUN;
First Program (page 332)
LIBNAME sports 'c:\MySASLib'; DATA outfitters; SET sports.customer; WHERE Name = 'Sports Outfitters'; PROC PRINT DATA = outfitters; RUN;Second Program (page 332)
LIBNAME sports 'c:\MySASLib'; DATA outfitters (WHERE = (Name = 'Sports Outfitters')); SET sports.customer; PROC PRINT DATA = outfitters; RUN;Third Program (page 332)
LIBNAME sports 'c:\MySASLib'; PROC PRINT DATA = sports.customer; WHERE Name = 'Sports Outfitters'; RUN;
Program (page 333)
LIBNAME sports 'c:\MySASLib'; PROC PRINT DATA = sports.customer (WHERE = (Name = 'Sports Outfitters')); RUN;
The sample is authored by Lora D. Delwiche and Susan J. Slaughter.
Their book The Little SAS Book: A Primer, Fourth Edition is available for sale in our online bookstore.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Appendix D, Output p. 328Appendix D, Output p. 329
Customer Number 102 Customer Obs Number Name Address 1 102 Sun N Ski 2106 Newberry Ave.Appendix D, Output p. 331
Customer Obs Number Name Address 1 103 Sports Outfitters 19 Cary WayAppendix D, Output p. 332 top
Customer Obs Number Name Address 1 103 Sports Outfitters 19 Cary WayAppendix D, Output p. 332 bottom
Customer Obs Number Name Address 1 103 Sports Outfitters 19 Cary WayAppendix D, Output p. 333 top
Customer Obs Number Name Address 3 103 Sports Outfitters 19 Cary WayAppendix D, Output p. 333 bottom
Customer Obs Number Name Address 3 103 Sports Outfitters 19 Cary Way
Type: | Sample |
Date Modified: | 2009-01-29 17:22:34 |
Date Created: | 2009-01-29 11:01:10 |
Product Family | Product | Host | SAS Release | |
Starting | Ending | |||
SAS System | Base SAS | z/OS | ||
OpenVMS VAX | ||||
Microsoft® Windows® for 64-Bit Itanium-based Systems | ||||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | ||||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | ||||
Microsoft Windows XP 64-bit Edition | ||||
Microsoft® Windows® for x64 | ||||
OS/2 | ||||
Microsoft Windows 95/98 | ||||
Microsoft Windows 2000 Advanced Server | ||||
Microsoft Windows 2000 Datacenter Server | ||||
Microsoft Windows 2000 Server | ||||
Microsoft Windows 2000 Professional | ||||
Microsoft Windows NT Workstation | ||||
Microsoft Windows Server 2003 Datacenter Edition | ||||
Microsoft Windows Server 2003 Enterprise Edition | ||||
Microsoft Windows Server 2003 Standard Edition | ||||
Microsoft Windows XP Professional | ||||
Windows Millennium Edition (Me) | ||||
Windows Vista | ||||
64-bit Enabled AIX | ||||
64-bit Enabled HP-UX | ||||
64-bit Enabled Solaris | ||||
ABI+ for Intel Architecture | ||||
AIX | ||||
HP-UX | ||||
HP-UX IPF | ||||
IRIX | ||||
Linux | ||||
Linux for x64 | ||||
Linux on Itanium | ||||
OpenVMS Alpha | ||||
OpenVMS on HP Integrity | ||||
Solaris | ||||
Solaris for x64 | ||||
Tru64 UNIX |