{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

prg1c02 - Chapter 2 Getting Started with SAS 2.1...

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

View Full Document Right Arrow Icon
1 Chapter 2: Getting Started with SAS 2.1 Introduction to SAS Programs 2.2 Submitting a SAS Program
Background image of page 1

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

View Full Document Right Arrow Icon
2 Chapter 2: Getting Started with SAS 2.1 Introduction to SAS Programs 2.1 Introduction to SAS Programs 2.2 Submitting a SAS Program
Background image of page 2
3 Objectives List the components of a SAS program. State the modes in which you can run a SAS program.
Background image of page 3

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

View Full Document Right Arrow Icon
4 SAS Programs DATA steps are typically used to create SAS data sets. PROC steps are typically used to process SAS data sets (that is, generate reports and graphs, manage data, and sort data). A SAS program is a sequence of steps that the user submits for execution. Raw Data Raw Data DATA Step DATA Step Report Report SAS Data Set PROC Step PROC Step SAS Data Set
Background image of page 4
5
Background image of page 5

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

View Full Document Right Arrow Icon
6 2.01 Quiz How many steps are in this program? data work.NewSalesEmps; length First_Name $ 12 Last_Name $ 18 Job_Title $ 25; infile 'newemps.csv' dlm=','; input First_Name $ Last_Name $ Job_Title $ Salary; run; proc print data=work.NewSalesEmps; run; proc means data=work.NewSalesEmps; class Job_Title; var Salary; run; p102d01
Background image of page 6
7 2.01 Quiz – Correct Answer How many steps are in this program? 3 steps data work.NewSalesEmps; length First_Name $ 12 Last_Name $ 18 Job_Title $ 25; infile 'newemps.csv' dlm=','; input First_Name $ Last_Name $ Job_Title $ Salary; run; proc print data=work.NewSalesEmps; run; proc means data=work.NewSalesEmps; class Job_Title; var Salary; run; DATA Step PROC Step PROC Step p102d01
Background image of page 7

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

View Full Document Right Arrow Icon
8 SAS Program Example This DATA step creates a temporary SAS data set named Work.NewSalesEmps by reading four fields from a raw data file. data work.NewSalesEmps; length First_Name $ 12 Last_Name $ 18 Job_Title $ 25; infile 'newemps.csv' dlm=','; input First_Name $ Last_Name $ Job_Title $ Salary; run; proc print data=work.NewSalesEmps; run; proc means data=work.NewSalesEmps; class Job_Title; var Salary; run;
Background image of page 8
9 SAS Program Example This PROC PRINT step creates a listing report of the Work.NewSalesEmps data set. data work.NewSalesEmps; length First_Name $ 12 Last_Name $ 18 Job_Title $ 25; infile 'newemps.csv' dlm=','; input First_Name $ Last_Name $ Job_Title $ Salary; run; proc print data=work.NewSalesEmps; run; proc means data=work.NewSalesEmps; class Job_Title; var Salary; run;
Background image of page 9

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

View Full Document Right Arrow Icon
10 SAS Program Example This PROC MEANS step creates a summary report of the Work.NewSalesEmps data set with statistics for the variable Salary for each value of Job_Title . data work.NewSalesEmps; length First_Name $ 12 Last_Name $ 18 Job_Title $ 25; infile 'newemps.csv' dlm=','; input First_Name $ Last_Name $ Job_Title $ Salary; run; proc print data=work.NewSalesEmps; run; proc means data=work.NewSalesEmps; class Job_Title; var Salary; run;
Background image of page 10
11 Step Boundaries SAS steps begin with either of the following:
Background image of page 11

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

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}