{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

prg1c02

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

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

1 Chapter 2: Getting Started with SAS 2.1 Introduction to SAS Programs 2.2 Submitting a SAS Program

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

View Full Document
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
3 Objectives List the components of a SAS program. State the modes in which you can run a SAS program.

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

View Full Document
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
5

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

View Full Document
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
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

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

View Full Document
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;
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;

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

View Full Document
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;
11 Step Boundaries SAS steps begin with either of the following:

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}