FORS8000
Week 13: Syntax
schmintax-- how to translate
a SAS manual into American- English
Save example dataset richden.xls (in Excel 2000) to a disk or on your hard drive. Create a library named "easy" and import the Excel file into SAS.
Open the online electronic manual.
Information on basic data manipulation procedures (sort, transpose, append, print, and mathematical operators) and data summary procedures (freq, means, univariate, corr) are located in "Base SAS Software" section under the heading "SAS Procedures Guide".
Information on statistical procedures for regression, analysis of variance, etc are located in "SAS/STAT" section under the heading "SAS/STAT Users Guide".
Because we should be somewhat familiar with the syntax of basic data manipulation procedures, we'll begin by examining the section on located in "Base SAS Software" section under the heading "SAS Procedures Guide".
Select the "Append" procedure. The information for all SAS procedures are generally arranged in 5 basic sections: Overview, Procedure Syntax, Concepts, Results, and Examples. The Overview section describes the procedure and its uses. The Procedure Syntax section describes the proper programming format for the procedure and contains information on required arguments and options, such as specifying and naming output files. Click on the Overview section and examine.
Next, click on Procedure Syntax.
How to interpret the manual's syntax statement:
Return to the "Append" main page and click on the APPEND Statement link. This section explans each statement and option listed in the syntax statement.
Return to the "SAS Procedures Guide", select the "CORR" procedure, and examine the overview. When do you use this procedure?
Next, click on the "Procedure Syntax" link. Which statements are required?
Next, click on the "Examples" link and choose Example 1: Computing Pearson Correlations and Other Measures of Association. These examples can be copied and pasted directly into SAS and submitted. Try it.
Now examine the freq, means, print, sort, and univariate procedures.