MGS 8040 Data Mining

Dr. Satish Nargundkar

Basic SAS Instructions

 

Creating Folders

 

  1. Create a folder on your machine called PROJECT.
  2. Create the following subfolders:

 

Folder Name

What it is for

DATA

 

(point the word SAVE in the start.sas program to this folder)

To store SAS data files like data1.sd2, xtra1.sd2

FORMATS

 

(point the word LIBRARY in the start.sas program to this folder)

To store the file called formats.sc2, a compiled list of formats. This file is not readable as text. Do not try to open it.

PROGRAMS

To store programs that you write, and the sample programs I have provided, like start.sas, formats.sas, freq.sas, reg1.sas, etc. Programs are used to call up data from the DATA folder and associate that data with the formats from the FORMATS folder.

OUTPUT

To store the output files you create when you run programs in SAS. Start with an empty folder. Output files are typically either .lst files or .html files. The files in the output folder are what you will post as your assignments.

 

  1. Download the zip files from the Project A link on the class website. (http://www.nargund.com/gsu/mgs8040/projecta.htm). Extract the data files into the DATA folder, the program files into the PROGRAMS folder, and the format.sc2 file into the FORMATS folder.

 

Using SAS:

 

  1. When you launch SAS the first time, open the file called start.sas from the PROGRAMS folder. Edit the file to change the paths as follows:

·         Point the word SAVE to the location of the DATA folder and

·         Point the word LIBRARY to the location of the FORMATS folder on your machine.

·         Save the edited file (replace the old start.sas with this version) back in the PROGRAMS folder.

·         Submit (run) the program (hit F8, or click on the ‘running man’ icon).

 

  1. Every time you launch SAS after the first time, simply open the start.sas file and run it. This will initialize the words SAVE and LIBRARY to refer to the location of the DATA and FORMATS folders.

Hereafter, you will refer in SAS to any dataset in your data folder as SAVE.<filename>, and the word LIBRARY will help you call on formats that you have defined.