lab 3 - EXST 7005 Fall 2010 Lab #3: Basic Proc Statements...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 EXST 7005 Fall 2010 Lab #3: Basic Proc Statements and Data Organization NAME EXAM LABAVG SEC ID Kyle 95 90 2 4414 David 90 85 1 7477 Mike 82 91 2 8164 Sam 85 88 2 8361 Jacob 77 78 3 8466 Monica 79 69 2 9135 Beth 63 75 3 2082 Jamie 87 92 1 8308 Casey 99 98 3 3564 Shelly 78 74 3 7746 Kelly 94 90 1 2602 Amy 88 85 3 8946 Ryan 83 90 1 9628 Ann 90 84 1 0221 Carol 78 83 2 3189 Susan 82 76 1 6194 Joe 91 87 3 1753 Bruce 80 67 1 2256 Bill 92 95 3 1067 Karl 76 73 2 4722 Basic Proc Statements PROC PRINT The PRINT procedure is used to print data in tabular form. It is frequently used with other options such as: 1) VAR: it controls the variables to be printed and the order in which they are printed. For example, if you want to exhibit only NAME and EXAM, but not other variables, you can use the following code: proc print data =GRADE; var NAME EXAM; run ; 2) BY: it groups the observations by values of one or more certain variables. However, the dataset must be sorted before using this statement. So it is usually used after the PROC SORT procedure.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 PROC SORT The SORT procedure is used to generate a new dataset in which all the observations are ordered according to values of one or more variables. It is always followed by the OUT option in which we name and locate the new dataset. The OUT option must be in the PROC SORT statement and could not be separated by a semicolon. It is ok to put it in another line though. If you don’t use this option, the previous dataset will be replaced. You can make the new dataset either a temporary one or a permanent one by choosing the library’s name before the dataset. By default, “WORK” is a temporary SAS library, and “SASUSERS” is a permanent SAS library. The statement BY always comes after the SORT statement. It specifies the variable according
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/29/2011 for the course EXST 7005 taught by Professor Geaghan,j during the Fall '08 term at LSU.

Page1 / 4

lab 3 - EXST 7005 Fall 2010 Lab #3: Basic Proc Statements...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online