Special Course Materials

Printer-friendly versionPrinter-friendly version

What do the special course materials look like and, how do they work?

Throughout the lesson pages, you will occasionally see links to special materials. The purpose of the special materials is to display examples, "walk you through" something, or to provide you with an additional explanation of the concepts covered in the lesson. Some links, if you have your computer configured properly, will launch SAS and open a SAS program automatically within your SAS application.

Launching SAS programs

launch SAS programFor the sake of efficiency, the "Launch SAS" button will download the relevant SAS program for you and open it automatically within the SAS application on your computer.

Configuring your browser so that downloads open your SAS application automatically

Throughout this course, you will be asked to "launch SAS" in order to run various SAS programs that illustrate the key points covered in the lessons. To do so, just click on the "Launch SAS" button:

launch SAS program

when it appears. One of two things should happen when you click on the button: 1) Either a new browser window which contains the program code appears, 2) or your SAS application launches with the program editor containing the relevant program code.

If a browser window containing the program code appears, open your SAS application (if it isn't already open), copy the program code into the program editor, and then run the program.

If your SAS application launches with the program editor containing the relevant program code, you're all set — just go ahead and run the program.

If you want your SAS application to automatically launch with the relevant program and it doesn't, then try using Internet Explorer (IE) as your browser for this course. Seriously. If you do, then you can tell IE to launch SAS whenever it encounters a "Launch SAS" button (or more generally, whenever it encounters a SAS file with a ".sas" extension). Here's how:

1) The first time that you click on a "Launch SAS" button (or a linked file with a ".sas" extension), a dialog box appears and asks whether you want to "Open the file with a specific application," "Save the file to a location on your computer," or "Cancel the download." Select the option for opening all files that have the file extension '.sas' with your SAS application. If IE isn't smart enough to do it for you, you may have to find and select the SAS program through this dialog box. Once this configuration is set, any time you click on a link that is a SAS file having a ".sas" extension, it will automatically launch SAS (if it isn't open already) and then open the program within the program editor window of your SAS application.

2) If you missed setting IE appropriately the first time around, you can still let IE know for what file types you want SAS to open. When the program code shows up in a separate window, use the File >> "Save Page As" option and save the file to a location on your computer. Now, locate the newly saved file and right-click on it so that a dialog box similar to this appears:

Open With Dialog Box

The key selection here is the "Open With" option. If SAS does not appear on the list, then use the "Choose Program..." option. You should get a dialog box that looks like this:

Open With Selection

Make sure that you check the box that is circled in red — "Always use the selected program to open this kind of file." Select OK and you should be all set.

Now, theoretically, you should be able to tell other browsers to do the same. I have not yet been able to figure out how to set Mozilla Firefox to open SAS files automatically. Anyone want some extra credit? (Just kidding, of course!)

Datasets

Relevant datasets are occasionally linked within a lesson, so that you can use them in an external SAS program. Data sets that are stored as text files have a ".txt" extension, while SAS data sets have a ".sas7bdat" extension. If you left-click on such a data set link, the data set will appear in a new browser window — it will be readable if it is a text file and look like gobbledygook if it is a SAS data set. We'll mostly just want to save the data sets to a specific location on our computers so that we can use them within the SAS application.Save Link As ...

If you want to download and save the data set to a specific location on your computer, right-click the link and select the "Save Link As" option (see right). A Save dialog box will appear and allow you to save the text file to the location you choose on your computer.

 


A Typical SAS Program Example

Here is an example of how these special course materials are incorporated into the lesson pages. Typically, you will first see a graphic containing the SAS program or SAS output. Below the graphic you will find an Inspect! button which, when clicked, opens a viewlet that walks you through the program as well as its output. In addition, you will find the Launch SAS button which, when clicked, should automatically open up the program within SAS so that you can run the program yourself. (In this case, the data are included within the SAS program itself. Therefore, it is not necessary to provide another link to a text file containing the data set.)

Go ahead — give it a try!

launch SAS program