prg1c04 - Chapter 4 Getting Familiar with SAS Data Sets 4.1...

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

View Full Document Right Arrow Icon
1 Chapter 4: Getting Familiar with SAS Data Sets 4.1 Examining Descriptor and Data Portions 4.2 Accessing SAS Data Libraries 4.3 Accessing Relational Databases (Self-Study)
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 4: Getting Familiar with SAS Data Sets 4.1 Examining Descriptor and Data Portions 4.1 Examining Descriptor and Data Portions 4.2 Accessing SAS Data Libraries 4.3 Accessing Relational Databases (Self-Study)
Background image of page 2
3 Objectives Define the components of a SAS data set. Define a SAS variable. Identify a missing value and a SAS date value. State the naming conventions for SAS data sets and variables. Browse the descriptor portion of SAS data sets by using the CONTENTS procedure. Browse the data portion of SAS data sets by using the PRINT procedure.
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
SAS Data Set A SAS data set is a file that SAS creates and processes. Partial Work.NewSalesEmps Data Set Name WORK.NEWSALESEMPS Engine V9 Created Fri, Feb 08, 2008 01:40 PM Observations 71 Variables 4 ... First_Nam e $ 12 Last_Name $ 18 Job_Title $ 25 Salary N 8 Satyakam Denny Sales Rep. II 26780 Monica Kletschkus Sales Rep. IV 30890 Descriptor Portion Data Portion
Background image of page 4
5 Descriptor Portion The descriptor portion of a SAS data set contains the following: general information about the SAS data set (such as data set name and number of observations) variable information (such as name, type, and length) Partial Work.NewSalesEmps Data Set Name WORK.NEWSALESEMPS Engine V9 Created Fri, Feb 08, 2008 01:40 PM Observations 71 Variables 4 ... First_Nam e Last_Name Job_Title Salary General Information Variable Information
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 Browsing the Descriptor Portion The CONTENTS procedure displays the descriptor portion of a SAS data set. General form of the CONTENTS procedure: Example: PROC CONTENTS DATA= SAS-data-set ; RUN; PROC CONTENTS DATA= SAS-data-set ; RUN; proc contents data=work.NewSalesEmps; run; p104d01
Background image of page 6
7 Browsing the Descriptor Portion Partial PROC CONTENTS Output The CONTENTS Procedure Data Set Name WORK.NEWSALESEMPS Observations 71 Member Type DATA Variables 4 Engine V9 Indexes 0 Created Wed, Jan 16, 2008 Observation Length 64 02:14:20 PM Last Modified Wed, Jan 16, 2008 Deleted Observations 0 02:14:20 PM Protection Compressed NO Data Set Type Sorted NO Label Alphabetic List of Variables and Attributes # Variable Type Len 1 First_Name Char 12 3 Job_Title Char 25 2 Last_Name Char 18 4 Salary Num 8
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
Background image of page 8
9 4.01 Quiz How many observations are in the data set Work.donations ? Retrieve program p104a01 . After the DATA step, add a PROC CONTENTS step to view the descriptor portion of Work.donations . Submit the program and review the results.
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 4.01 Quiz – Correct Answer How many observations are in the data set Work.donations ? 124 observations data work.donations; infile 'donation.dat'; input Employee_ID Qtr1 Qtr2 Qtr3 Qtr4; Total=sum(Qtr1,Qtr2,Qtr3,Qtr4); run; proc contents data=work.donations; run; p104a01s
Background image of page 10
11 Data Portion The data portion of a SAS data set is a rectangular table of character and/or numeric data values.
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 ]}

Page1 / 74

prg1c04 - Chapter 4 Getting Familiar with SAS Data Sets 4.1...

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

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