Internet SAS Class Frequently Asked Questions, FAQ

Why is this class being offered only on the internet?

This class is being offered during the summer when many of our graduate students are working or are out of town. Having the course offered via a distance approach makes it easier for such students to take the course. Furthermore, more and more professional work is being done via electronic communication, so it is important to learn how to operate in this manner. What better sort of class to introduce this approach than a computer course!?

Does this course fulfill a psychology department methods requirement?

Yes, this course is one of the optional methods courses for graduate students in USF's psychology department, and fulfills this requirement. It can also be part of a minor, or for I/O students, one of the required 7 advanced courses. Keep in mind that it can only meet one of these requirements.

How can I get my own copy of SAS?

If you are a USF student or staff member, you can lease a copy of SAS for your own home (or office) computer for $80 per year through the USF bookstore. You can access SAS through computers in PCD, although it is possible you will have to activate/install it from the network.

The lines of my program or program output are too wide for the screen, or the lines are cut off when I send them. What's wrong?

The default linesize for SAS is wider than most people's screens or e-mail will display. There are two ways to over-ride this, which is described in the linesize instructions.

Should I pay attention to the messages in the SAS log?

Absolutely yes. Do you pay attention to stop signs and traffic lights? The log gives you information about what SAS did with your program. It tells you about every file it read and wrote to, including the number of cases and variables. Check to be sure they are correct. It also gives clues that can indicate if it read your data lines correctly, if it encountered missing data, if all variables have been properly defined, and if there have been syntax errors. Getting output does not mean you don't have errors. It is best to look at the log first, and then if everything is correct, look at your output.

Why isn't SAS reading my datalines correctly from an external file?

When you read a file, you must be sure that there aren't extra characters or missing characters anywhere in the dataset. Sometimes when you download a file using a browser, hidden junk characters are placed at the end of each line. SAS will think these are data, and so it will become very confused. Depending upon how you view downloaded files, you may or may not see these extra characters. If data are in fixed columns, it is always safer to specify column location, rather than using free format (relying on blank spaces or other delimiters to distinguish variables). Furthermore, if there are missing characters, SAS will be confused, as it will think the value immediately following the missing one is the right one, when it isn't. It is helpful to use the keyword 'missover' at the end of the INFILE command to tell SAS that if data are missing for one case (subject) not to go to the next case (dataline) looking for the missing values. The syntax is:

INFILE 'a:myfile.dat' MISSOVER;

Why am I getting an error message that says I have illegal characters?

This error message usually means that you defined a variable to be numeric (numbers only), but your dataset has alphabetical (letters) characters or symbols that are not allowed. This can cue you that you have errors, if your data should be all numbers (you have data entry errors or you are reading the wrong variables). If alpha characters are correct, then you should define your variables appropriately, using a $. See pp. 38 of your textbook.

Why do I keep getting an error that I don't have balanced quotes, but I know I fixed the problem and have an equal number?

SAS has an odd quirk that sometimes an error condition in the program carries over from run to run when using the PC version (maybe it happens with other versions, but I've not run them). My guess is that somehow something is being read from memory rather than restarting the program from scratch, but that is just a guess. The solution is the following: SAVE YOUR PROGRAM--and then turn SAS off and back on, but first SAVE YOUR PROGRAM. By exiting SAS you will cause it to reset everything. It happens sometimes when you forget to close a quote (e.g., on an infile or file statement where you refer to a file name).

With an array, what does subscript out of range mean?

When you define an array, usually you give it a fixed number of elements (variables). If you make a mistake and reference (tell SAS to access) an element that doesn't exist, you will get this error. This might occur with a do loop, where the array has 10 variables put your loop goes from 1 to 11. Sometimes this happens if you put your loop index variable (usually i) in an expression that changes it's value.

Copyright Paul E. Spector, All rights reserved. Last modified April 16, 2004.