Introduction xiii Typographical conventions sAs doesnt care whether your programs are written in or lowercase, so you can write your programs any way you want. In this book, we have used uppercase and lowercase to tell you something. The statements on the left below show the syntax, or general form, while the statements on the right show an example of actual statements as they might appear in a SAS program. PROC PRINT DATA data-set-name PROC PRINT DATA bigcats VAR variable-list AR Lions Tigers Notice that the keywords PROC PRINT, DATA, and VAR are the same on both sides and that the descriptive terms data-set-name and variable-list on the syntax side have been replaced with an actual data set name and variable names in the example In this book, all SAs keywords appear in uppercase letters. A keyword is an instruction to SAS and must be spelled correctly. Anything written in lowercase italics is a description of what goes in that spot in the statement, not what you actually type. Anything in lowercase or mixed case etters(and not in italics)is something that the programmer has made up such as a variable name, a name for a sas data set, a comment, or a title. See section 1.2 for further discussion of cance of case in Sas nar Indention This book contains many SAS programs, each complete and executable Programs are formatted in a way which makes them easy for you to read and understand. You do not hav to format your programs this way, as SAS is very flexible, but attention to some of these details will make your programs easier to read. Easy-to-read programs are time-savers for you, or the onsultant you hire at $100 per hour, when you need to go back and decipher the program months or years later The structure of programs is shown by indenting all statements after the first in a step. This is a simple way to make your programs more readable, and it's a good habit to form. SAS doesn't really care where statements start or even if they are all on one line. In the following program the INFILE and INPUT statements are indented, indicating that they belong with the DATA Read animals weights from file. Print the results DATA animals INFILE 'c: \MyRawData\Zoo. dat PROC PRINT DATA animals: Last, we have tried to make this book as readable as possible and, we hope, even enjoyable. Once you master the contents of this small book you will no longer be a beginning SAS programmerIntroduction xiii Typographical conventions SAS doesn’t care whether your programs are written in uppercase or lowercase, so you can write your programs any way you want. In this book, we have used uppercase and lowercase to tell you something. The statements on the left below show the syntax, or general form, while the statements on the right show an example of actual statements as they might appear in a SAS program. Syntax Example PROC PRINT DATA = data-set-name; PROC PRINT DATA = bigcats; VAR variable-list; VAR Lions Tigers; Notice that the keywords PROC PRINT, DATA, and VAR are the same on both sides and that the descriptive terms data-set-name and variable-list on the syntax side have been replaced with an actual data set name and variable names in the example. In this book, all SAS keywords appear in uppercase letters. A keyword is an instruction to SAS and must be spelled correctly. Anything written in lowercase italics is a description of what goes in that spot in the statement, not what you actually type. Anything in lowercase or mixed case letters (and not in italics) is something that the programmer has made up such as a variable name, a name for a SAS data set, a comment, or a title. See section 1.2 for further discussion of the significance of case in SAS names. Indention This book contains many SAS programs, each complete and executable. Programs are formatted in a way which makes them easy for you to read and understand. You do not have to format your programs this way, as SAS is very flexible, but attention to some of these details will make your programs easier to read. Easy-to-read programs are time-savers for you, or the consultant you hire at $100 per hour, when you need to go back and decipher the program months or years later. The structure of programs is shown by indenting all statements after the first in a step. This is a simple way to make your programs more readable, and it’s a good habit to form. SAS doesn’t really care where statements start or even if they are all on one line. In the following program, the INFILE and INPUT statements are indented, indicating that they belong with the DATA statement: * Read animals’ weights from file. Print the results.; DATA animals; INFILE ’c:\MyRawData\Zoo.dat’; INPUT Lions Tigers; PROC PRINT DATA = animals; RUN; Last, we have tried to make this book as readable as possible and, we hope, even enjoyable. Once you master the contents of this small book you will no longer be a beginning SAS programmer