![]() |
|
|
|||||||||||||||||||||||||||
|
Objectives
Procedure (PROC) statements specify the procedure to be used on the data set you created. The general form of the statements needed to execute a SAS procedure is: PROC procedure_name options parameters; Example: PROC PRINT N; Beginning SAS users should become familiar with these procedures: PROC PRINT; In this Session you will learn to use PROC PRINT and PROC FREQ. PROC PRINT statement
PROC PRINT lists data as a table of observations by variables. The general form of the PRINT procedure is: PROC PRINT; VAR is an additional procedure information statement in the PRINT procedure that allows you to pick out specific variables to be printed in a certain order. Without the VAR statement, all variables in the data set would be output in the print listing. Sample output from the PRINT procedure Use: To produce a frequency table or 2-way table of your data Syntax: PROC FREQ; PROC FREQ shows the distribution of variable values through a one-way
table or through crosstabulation tables. The general form of the PROC
FREQ statement is:
PROC FREQ; PROC FREQ;
Your SAS program should now look like this:
sas survey.sas
You will know your job is completed when you see the $
prompt again. Now edit the survey.log file and check for errors,
warnings, and notes. If your program ran without errors go on to the
next session. If your program output shows errors, check the program
carefully to make sure it is exactly like the examples given in this
tutorial. If you find the errors and correct them, make sure you save
your changes and then resubmit your job as above.
If you cannot find your errors, ask the student consultant in any
of our computing pods for assistance or call ITS' Support Center (277.4848).
|
||||||||||||||||||||||||||
![]()
| © University of New Mexico -- last updated -- comments to: docs@unm.edu |