Search Header Logo
SAS Module 2

SAS Module 2

Assessment

Presentation

Computers

9th - 12th Grade

Hard

Created by

Laura FisherJohnson

Used 1+ times

FREE Resource

6 Slides • 7 Questions

1

SAS Module 2

Slide image

2

Vocabulary

  • Structured Data- contains defined rows and columns. Examples: SAS, Oracle, Excel and others

  • Unstructured Data-no columns; must be imported. Examples: text, csv, and others

  • SAS Table- structured data that has rows and columns

  • Observation: row

  • Variable: Column

3

Multiple Select

Which are examples of structured data?

1

CSV

2

xlsx

3

oracle

4

SAS

5

Text

4

Column Attributes

  • Each column (variable) must have a name type and length

  • Name: 1-32 characters, starts with letter or underscore, can contain numbers in addition, not case sensitive

  • Numeric Data Type: digits, minus sign (-), decimal point, scientific Notation (E). Dates are numeric data.

  • Character Data Type: letters, numbers, characters, special characters.

  • Length- Numeric is always 8 bytes (16 digits), character is 1-32,767 bytes

5

Multiple Choice

What is the maximum number of characters in a variable name?

1

8

2

16

3

24

4

32

6

Multiple Choice

What is another name for a column in sas?

1

heading

2

title

3

variable

4

observation

7

Proc Contents

  • Example: proc contents data = "c://file location/folder/folder/tablename.sas7.bdat"; run;

  • allows you to view table attributes

  • a listing of the descriptor portion of the table (where table is stored, when created, number of rows and columns, variable list by type and length)

  • Also called metadata


8

Multiple Select

What does proc contents show?

1

descriptor portion of the table

2

meta data

3

table attributes

4

none of the above

9

Multiple Select

What is listed in the descriptor portion (attributes, metadata) of a data set?

1

table location

2

how many people have accessed the table in the last 24 hours

3

created; last modified

4

number of rows and columns

5

variable list

10

Reading SAS files

  • LIBNAME [libref] [engine] [file location]; This is a global statement that does not require a run;

  • libref is what you choose to name the library. (8 character max, must start with underscore or character, can only contain letters, numbers, or underscores)

  • engine: type of data. Not really required but helpful if you are using specific file types like excel (xlsx)

  • file location: file path for the files being used

  • Libname statements are active and in effect until you delete the library refernce:

  • libname NameOfLibrary clear; <-- this is how you delete reference

11

Multiple Select

Which are requirements of a library name?

1

Must start with a character or underscore.

2

Must be 8 characters or less

3

Can only contain letters, numbers, and underscores

4

Must be the name of a public library in your town

12

Multiple Choice

How do you terminate a reference to a SAS library?

1

run;

2

clear;

3

quit;

4

none of the above

13

Referring to SAS Libraries

  • Instead of proc contents data = "c://file location/folder/folder/tablename.sas7.bdat" write proc contents data = libraryname.tablename;

SAS Module 2

Slide image

Show answer

Auto Play

Slide 1 / 13

SLIDE