1.2 Flashcards
Which of the following is NOT an example of structured data?
a) SAS tables
b) MS Access tables
c) comma-delimited files
d) Oracle DBMS tables
c) comma-delimited files are unstructured
True/False - JSON files are examples of unstructured data.
True - JSON files, text files, comma-delimited files, and weblogs are all examples of unstructured data
True/False - you can analyze and report on unstructured data in SAS.
False - you must import unstructured data into SAS before analyzing and reporting on it.
Which of the following is true regarding SAS tables?
a) the file extension is .sasbdat
b) there are two parts to a SAS table - a descriptor portion and a data portion
c) the data portion contains columns names
d) the descriptor portion contains data values
b) there are two parts to a SAS table - a descriptor portion and a data portion
a - the file extension is .sas7bdat
c & d - The descriptor portion contains the metadata, or the properties of the table, such as the name, the number of rows, and the date and time the table was created. The descriptor portion also includes column names and attributes. The data portion contains the data values, stored in columns.
Which of the following is NOT a required attribute of a SAS column:
a) a label
b) a name
c) a type
d) a length
a) a label
True/False - SAS column names can be 1 to 36 characters long.
False - SAS columns names can be 1 to 32 characters long.
True/False - SAS column names must start with a letter or underscore.
True - SAS column names must start with a letter or underscore.
True/False - SAS columns are stored in uppercase by default.
False - Column names are stored in the case that you use when you create the column and can be in uppercase, lowercase, or mixed case.
True/False - Special symbols and spaces cannot be used in SAS column names.
False - Depending on the environment you use to submit your code, SAS might allow for spaces and special symbols other than underscores in column and table names. If you use data sources other than SAS that have flexible column name rules, SAS can make allowances for that, however, it’s recommended to follow the SAS naming conventions.
Which of the following are SAS column attribute Types:
a) numeric
b) character
c) date
d) a & b
e) a, b & c
d) numeric and character (SAS dates are a particular kind of numeric value).
Which of the following statements are true?
a) numeric columns can only store numeric values, which can include the digits 0 through 9, a minus sign, and a single decimal point.
b) Character columns can store only letters
c) Character columns store SAS dates
d) Character columns can store, letters, numbers, special characters and blanks.
d) Character columns can store, letters, numbers, special characters and blanks.
a - numeric columns can only store numeric values, which can include the digits 0 through 9, a minus sign, and a single decimal point. Can also hold E for scientific notation.
Which of the following is NOT true regarding SAS dates?
a) SAS stores date values as the number of days between January 1, 1960 and a specific date.
b) Dates before January 1, 1960 are stored as negative values.
c) You must use special functions to accommodate leap years when programming SAS.
d) There are numerous ways to display numeric date values so they look like dates you can understand.
c) You must use special functions to accommodate leap years when programming SAS.
Which column names below follow SAS naming conventions (select all that apply)?
a) month6
b) 6month
c) month#6
d) month 6
e) month_6
f) Month6
a) month6, e) month_6, and f) Month6
According to SAS naming conventions, column names cannot start with a number and cannot include blanks or special characters.
Which of the following is true regarding the PROC CONTENTS procedure?
a) It generates a report of the data portion of the table.
b) It provides summary statistics for numeric variables by default
c) It gives general information about the table, including where the table is stored, when it was created and modified, and the number of rows and columns.
d) It produces a table called “Alphabetic List of Variables and Attributes”
e) c & d
e) c & d
a - It generates a report of the descriptor portion of the table
True/False - The following code will run without error.
proc contents data=”s:/workshop/data/class.sas7bdat”;
run;
True - assuming the class.sas7bdat exists in the directory listed. However, this hardcoding of the filepath is not recommended.