• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key


Play button


Play button




Click to flip

268 Cards in this Set

  • Front
  • Back
What are the two portions of the SAS data set?
Descriptor and Data
What does the descriptor portion of a SAS data set contain?
General information about the SAS data set and variable attributes
Which portion of a SAS data is displayed by the CONTENTS procedure?
The two types of SAS variables
Character and Numeric
Character values are stored with a length of 1 to __________ ?
One character = ____ byte (s)
Default number of bytes for a numeric variable
Select the valid default SAS names:

five months data
data5mon, fivemonthsdata
True or False: SAS stores date values as character values.
A SAS date is stored as teh number of days between this date and a date you specify.
January 1, 1960
The SAS procedure that displays the data portion of a SAS data set
PRINT procedure
SAS procedure which displays:

all observations
all variables
an Obs column on the left side
PRINT Procedure
True or False: Observations are in columns
True or False: Variables are in rows.
SAS statements usually begin with a ________________ .
Every SAS statement ends with a _______.
Character variable values can be up to ______ characters long and use ___ byte(s) of storage per character.

A SAS variable name has __ to __ characters and begins with a ______ or an ____________.



By default, numeric variables are stored in _ bytes of storage.
The internally stored SAS date value for January 1, 1960 is _.
A missing character value is displayed as a _____.
A missing numeric value is displayed as a _____.
What are the two kinds of steps?
What are the two portions of every SAS data set ?
Descriptor and Data
What are the two types of variables?
Character and Numeric
What are the two major parts of SAS output?
SAS Log and Output
True or False: If a SAS program produces output, then the program ran correctly and there is no need to check the SAS log.
True or False: Omitting a semicolon never causes errors.
Correcting the Syntax of the SAS Program:

data europeflight;
infile 'testdata.dat';
input @1 Flt-Num $3. @18 Destination $3. ;
proc print data=europeflight
data europeflight;
infile 'testdata.dat';
input @1 Flt_Num $3. @18 Destination $3. ;
proc print data=europeflight;
A collection of SAS files that are recognized as a unit by SAS.
SAS data library
Statement to assign a library
True or False: The libref work can be omitted when you refer to a file in the work library.
Keyword in PROC Contents to list all the SAS files in the library.
Option to suppress the descriptor portions of the data sets in PROC Contents.
To explore the descriptor portion of a SAS data set, specify the data set name in this option.
SAS Procedure that displays:

* titles and footnotes
* descriptive column headings
* formatted data values
PRINT procedure
PROC Print creates a ______ report
Statement in the print procedure which enables you to select variables to include in the report and define the order of variables in the report.
True or False: The var statement does not order the variables to print in PROC Print
Option in PROC Print that supresses the row numbers on the left side of the report.
Which statement

*enables you to select observations that meet a certain condition

*can be used with most SAS procedures ?
The where statement in the PRINT procedure allows you to _______ the data.
Statment that includes:

comparison operators
logical operators
special operators
Operator in the where statement that allows commas or blanks to separate values
Special operator which selects observations in which the value of the variable falls within a range of values, inclusively.
Special operator which selects (contains) observations that include the specified substring.
Statement which produces column totals in PROC Print.
Statement that produces subtotals if you print the data in groups in PROC Print.
Option that prints the number of output observations at the end of the report.
SAS Procedure which:

*rearranges the observations in a SAS data set

*can create a new SAS data set containing the rearranged observations

*can sort on multiple variables

*can sort in ascending (default) or descending order

*does not generate printed output

*treats missing values as the smallest possible value
SORT Procedure
Data must be indexed or in sorted order to use a ___ statement in a PROC Print step.
Using a __ statement and a ___ statement together in a PROC Print step produces subtotals and grand totals.
Use this statement to put each subroup on a separate page in PROC Print.
The statement in PROC Print that enables you to

*suppress the Obs column in the report

*specify which variable(s) should replace the Obs column
When this combination of statements specify _______

*The Obs column is suppressed,

*the BY line is suppresed,

*the ID/BY variable prints in the leftmost column,

*each ID/BY value only prints at the start of each BY group
ID and BY specify the same variable
Default sort order of PROC Sort
Special where statement operator that selects observations by comparing character values to specified patterns.
where Code like 'E_U%';

An underscore replaces __ character(s) and % replaces __ of character(s).
1, any number
Special where statement operator that selects observations that contain spelling variations of the word or words specified.
sounds like (=*)
For the special where statement operator sounds like, IS ___ or IS ______ selects observations which the value of the variable is missing.
null, missing
Syntex for a title and a footnote in a PROC PRINT.
titlen 'text';
footnoten 'text';
Titles appear at the ____ of the page.
The default title is
The SAS System
The value of n in titles and footnotes can be from __ to __.
1 to 10
An unnumbered title is equivalent to _____.
True or False: Titles change every time you submit your program.
The null title statement that cancels all titles.
Footnotes appear at the _____ of the page.
The default footnote.
True or False: Footnotes remain in effect until they are changed, cancelled, or you end your SAS session.
The null footnote statement.
Statement used in Proc Print to replace variable names in SAS output and also used automatically by many procedures.
True or False: The OPTIONS statement is NOT usually included in a PROC or DATA step.
'label' in the label statement specifiesa label up to ____ characters.
Specifies to print the date and time the SAS session began at the top of each page of the SAS output in the OPTIONS statement.
Specifies not to print the date and time the SAS session began in the OPTIONS statement.
Specifies the line size for the SAS log and SAS output.
linesize=width or ls=width
Specifies the number of lines (n) that can be printed per page of SAS output.
pagesize=n or ps=n
Specifies that page numbers be printed out on the first line of each page of output in the OPTIONS statement.
Specifies that page numbers not be printed in the OPTIONS statement.
Specifies a beginning page number (n) for the next page of SAS output in the OPTIONS statement.
_______ nodate nonumber ls=72;
In OPTIONS statement resets date and time to your system clock.
True or False: When SAS formats are used to format data values the values in the SAS data set are changed.
Statement used in PROC PRINT to enhance the readability of reports or recode data values.
To format multiple variables with the format statement, use a ____.
In the SAS format form,

<$>format<w>.<d>, the $ indicates a ___________ format.
In the SAS format form,

<$>format<w>.<d>, w means _____ _____.
total width
True or False:
In the SAS format form,

<$>format<w>.<d>, the . is not a required delimiter
In the SAS format form,

<$>format<w>.<d>, the d is ___________.
number of decimal places

width = ___, ___ decimal places

standard _______ format
width = ___
_______ in a number,
width = __, __ decimal places
commas, 9, 2

______ in a number
width= ___, ___ decimals
dollar signs and commas, 10, 2
True or False: If you do not specify a format width large enough to accommodate a numeric value, the displayed value is automatically adjusted to fit into the width.
A SAS date is stored as the number of days between _________ and the specified date.
Format for 01/01/60.
Format for 01JAN1960.
Format for 101601.
Format for 16OCT01.
Format for 16OCT2001.
Format for December 31, 1959.
Format for 31/12/1960.
Format for Sunday, January 1, 1961.
To turn the byline back on, use this in the OPTIONS statement.
Using this procedure you can create user-defined formats.
FORMAT procedure
In the format procedure the form is:

_____ format-name range1='label'

*cannot be more than __ characters in SAS 9 and __ in previous versions.
*for character values, must have a _ as the first character.
32,8, $
In PROC FORMAT, labels can be up to ______ characters in length

are typically in ______ , although it is not required
Format names in PROC Format are limited to _ characters prior to SAS version 9.
proc print data=ia.empdata;
format Salary money.;

A period is needed after money so SAS doesn't think that it is a ________ .
The ____ _____ statement opens, closes, and manages the HTML destination.
what is wrong with the format?

ODS HTML FILE= filename;
sas code
need quotes around filename
_____ is directed to the specified HTML file until you

*close the HTML destination
*specify another destination file
_____ is directed to the specified HTML file until you

*close the HTML destination
*specify another destination file
To read in a raw data file, use the _______ statement in the data step.
statement which:

*names the SAS variables
*identives the variables as character or numeric
*specifies the locations of the fields in the raw data
*can be specified as column, formatted, list, or named input
______ input is appropriate for reading
*data in fixed columns
*standard character and numeric data
The default SAS library.
The two phases that the DATA step is processed in.
compilation, execution
SAS creates an imput buffer to h old the current raw data file record that is being processed at ________ time.
A ______ _______ _______ holds the current SAS observation during compiling.
program data vector (PDV)
During compile time, the _______ portion of the output data set is set up.
During _____ of the data step, SAS reads in the data through the _____ statement.
execution, input
After executing the first observation in the raw data set, SAS does an automatic ______, ____ to SAS data set, and reinitializes the variables in the PDV to _______.
return, output missing
True or False: To access a temporary data set, you must use work.dataset.
To access a permanent data set, submit a _______ statement to assign a libref to the SAS data library and use the libref as the first-level name of the SAS data set.
True or False: The LIBNAME statement only needs to be submitted once per SAS session.
Formatted input is appropriate for reading:
* data in _____ columns
*standard and nonstandard character and numeric data
*_______ values to be converted to SAS date values
fixed, calendar
_______ input is used to read data values by
*moving the input pointer to the starting position of the field
*specifying the variable name
*specifying an _______
formatted, informat
___ moves the pointer to column n
___ moves the pointer n positions
An informat specifies:

* the ____ of the input field
* how to read the data values that are stored in the field
__ indicates a character informat
For an informat a _____ is a required delimiter.
Informats: 8. or 8.0 reads __ columns of numeric data
Informats: 8.2 reads __ columns of numeric data and my insert a decimal point in the value.
$8. reads __ columns of character data and removes leading ______
8, blanks
$CHAR8. reads 8 columns of ______ data adn preserves leading _______.
character, blanks
COMMA7. reads __ columns of numeric data and removes selected nonnumeric characters such as _____ _____ and _______.
7, dollar signs, commas
MMDDYY8. reads data in the form _________
SAS uses date informats to ____ and _______ dates to SAS date values
read, convert
SAS detects data errors when:

*the INPUT statement encounters invalid data in a field
*illegal arguments are used in ________
*impossible ___________ operations are requested
functions, mathematical
When SAS encounters a data error,
1. a note that describes the error is printed in the SAS ___.
2. the input record being read is displayed in the SAS ___(contents of the in put buffer)
3. the values in the SAS observation being created are displayed in the SAS ____ (contents of the PDV)
4. a missing value is assigned to the appropriate SAS variable
5. __________ continues
log, log, log, execution
When a variable is created in a DATA step, the
* ______, ______, and ______ are automatically assigned
*remaining attributes such as _____ and ______ are not automatically assigned
name, type, length, label, format
For default variable attributes when the variable is used in a later step,

*the ____ is displayed for identification purposes
*its _____ is displayed using a system-determined format.
name, value
Use _____ and ______ statements in a

*PROC step to temporarily assign attributes (for the duration of the step only)
*DATA step to permanently assign the attributes (stored in the data set descriptor portion)
label, format
Use a _______ statement in a PROC step to temporarily override the format stored in teh data set descriptor.
You can use the _________ procedure to modify a variable's
Proc _______ library =ia;
modify data-set;
label vrariable-1='label';
format variable-1 format-1;
informat variable-1
To create a SAS data set using a SAS data set as input, you must use a
*_____ statement to start a DATA step and name the SAS data set being created
*______statement to identify the SAS data set being read
data, set
To create a variable, you must use an
________ _________ to add the values of the variables and assign the sum to the new variable.
assignment statement
True or False: You can use INFILE and INPUT statements to read SAS data sets. They are not only used to read raw data files.
True or False: You cannot use a SET statement to read raw data files. It can only be used to read SAS data sets.
By default, the ____ statement reads all of the
*observations from the input SAS data set
*variables from the input SAS data set
Data ______-SAS-data-set;
SET _____-SAS-data-set;
additional SAS statements
output, input
An assignment statement:
*evaluates an __________
*assigns the resulting value to a ________
expression, variable
True or False :
General form of an assignment statement
expression = variable;
An __________ contains operands and operators that from a set of instructions that produce a value.
_________ are:
*variable names
___________ are:
*symbols that request arithmetic calculations
*SAS functions
A SAS ________ is a routine that returns a value that is determiend from specific arguements.
An example of a SAS _______ is

Total = sum(FirstClass,Economy);
SAS functions:
* perform arithmetic __________
*compute sample _________
*manipulate SAS _______ and process character values
*perform many other tasks
operations, statistics, dates
True or False: Sample statistics functions ignore missing values.
You can use SAS ______ functions to
*create SAS date values
*extract information from SAS date values
SAS date function that obtains the date value from the system clock.
SAS date function that uses numeric month, day, and year, values to return the corresponding SAS date value.
SAS date function that extracts the year from a SAS date and returns a four-digit value for year.
SAS date function that extracts the quarter from a SAS date and returns a number from 1 to 4.
SAS date function that extracts the month from a SAS date and returns a number from 1 to 12.
SAS date function that extracts the day of the week from a SAS date and returns a number from 1 to 7, where 1 represents Sunday, and so on.
You can use the _____ or ______ statement in a DATA step to control what variables are written to the new SAS data set.
True or False: More than one executable statement is allowed on an IF-THEN or ELSE statement.
You can use the ________ function to convert letters from lowercase to uppercase.
You can use the ___ and ____ statements to execute a group of statements based on a condition.
do, end
IF expression THEN ___;
executable statements
ELSE ___;
do, end, do, end
Use ___ and ___ statements to execute a group of statements based on a condition.
do, end
True or False: At compile time, the length of a variable is determined the last time the variable is encountered.
You can use the ______ statement to define the _______ of a variable explicitly.
length, length
length City __ 11;
In a Data step, you can subset the rows (obs) in a SAS data set with a
*W_____ statement
*D_____ statement
*subsetting I_ statment
where, delete, if
The ______ statment in a data step is the same as the ______ statment in a PROC step.
where, where
You can use a ______ statement to control which rows are written to the SAS data set.
If expression then D______;
You can use a subsetting __ statment to control which rows are written to the SAS data set.
____ expression;
if, if
True or False: The subsetting IF statement is valid only in a DATA step.
The constant '_________'d creates a SAS date value from the date enclosed in quotes.
__ is a one- or two-digit value for the day.

___ is a three-letter abbrev. for the month

____ is a two- or four-digit value for the year.

_ is required to convert the quoted string to a SAS date.
dd, MMM, yyyy, d
True or False: You cannot use the $UPCASE informat in the INPUT statement to translate the values of a variable to uppercase as they are read from the raw data file.
You can use a ______ or ______ data set option in a DATA statement to control what variables are written to the new SAS data set
drop=, keep=
Use the SET statement in a DATA step to __________ data sets.
True or False: You can only read one SAS data set with a single SET statment.
You can use a _______ data set option to change the name of a variable.
True or False: drop=, keep=, rename= all need parentheses around them in the data set option.
Use the SET statement with a ___ statement in a Data step to interleave SAS data sets.
_________ SAS data sets simply concatenates SAS data sets so the observations in the resulting data set are in order.
In the case wehre the data values are equal, the observation is always read from the _____ dtat set listed in the SET statement.
Before interleaving data sets, you can use Proc _______ to see if they have already been sorted.
Use the _____ statement in a DATA step to join corresponding observations from two or more SAS data sets using a common ___ variable.
merge, by
True or False: You can read any number of SAS data sets with a single MERGE statement.
Merging combines data sets ________ by a common variable.
SAS reinitializes variables created in the DATA step to _____ at the start of every DATA step iteration when merging data sets.
Use the ____ data set option to determine which data set(s) contribute to the current observation.

variable is a temproary numeric variable that has two possible values: ___ or ___
0, 1
True or False: The variable created with the IN= data set option is available during execution and is written to the SAS data set.
The subsetting IF controls what observations are written to the SAS data set. If the condition evaluates to _____, the observation is written to the SAS data set. If the condition is evaluated to _____, the observation is not written to the SAS data set.
true, false
A merge where unique BY values are in one data set and duplicate matching BY values are in the other data set.
A merge where duplicate matching BY values are in both data sets.
Summary Report Procedure that produces frequency counts.
proc freq
Summary Report Procedure that produces simple statistics
proc means
Summary Report Procedure that produces flexible detail and summary reports
proc report
Summary Report Procedure that produces flexible summary reports
proc tabulate
PROC ____ displays frequency counts of the data values in a SAS data set.
By default, PROC FREQ
*________ every variable in the SAS data set
*displays each distinct ____ value
*_______ the number of observations inwhich each data value appears
*indicates for each variable how many observations have ______ values
analyzes, data, calculates, missing
For each variable, PROC FREQ displays every unique value, counts how many observations have each value, and provides percentages and _________ statistics.
True or False: You do not create frequency reports for variables with a large number of distinct values. You usually only create them for categorial variables .
Use the _______ statement in PROC FREQ to limit the variables included in the frequency counts. These are typically variables that have a limited number of distinct values.
Use the ________ option in the PROC FREQ statement to display the number of levels for the variables included in the frequency counts.
To display number of levels without freq counts:

proc freq data=ia.crew nlevels;
tables JobCode Location / ______;
To display the number of levels for all vars without displaying any freq counts

proc freq data=ia.crew nlevels;
tables ____ /noprint;
PROC FREQ automatically groups the data by a variable's formatted value if a _______ is associated with that variable.
A two-way, or _________, frequency report analyzes all possible combinations of the distinct values of two variables.
In a crosstabular frequency report, the ________ operator in the TABLES statement is used to cross variables.
In a crosstabular report, the values of the first variable in the TABLES statement form the _____ of the freq table and the values of the second variable form the ______.
rows, columns
To display the crosstabulation results in a listing form:

proc freq data=ia.crew;
tables JobCode*Location /
The _____ procedure displays simple descriptive statistics for teh numeric variables in the SAS data set.
By default, PROC MEANS
*analyzes every _______ variable in the SAS data set
*prints the statistics __, _____, ___, ___, ____
*excludes missing values before calculating statistics
numeric, N, mean, std, min, max
Other statistics in PROC MEANS include
______ (number of rows of missing values)
The ___ statement restricts the variables processed by PROC MEANS.
The _____ statement in the MEANS procedure groups the observations of the SAS data set for analysis.
The _______ option controls the number of decimal places displayed in the output.
To supress the printing of the cumulative freqs and cumulative percentages use:

proc freq data=ia.sanfran;
tables Destination
title 'FLights from
San Francisco';
PROC ______ enables you to:
* create listing reports
* create summary reports
* enhance reports
* request separate subtotals and grand totals
*generate reports in an interactive point-and-click or programming environments
In PROC REPORT, use the ____ displays the report in the OUTPUT window.
The default listing for the report procedure displays:

*each data value as it is stored in the data set, or formatted value if a format is stored with the data
*variable names or labels as report column headings
*a default width for the report columns
*character values _____-justified
*numeric values _____-justified
*observations in the order in which they are stored in the data set.
left, right
You can use a _______ statement to

*select the variables to appear in the report
*order the variables in the report
You can enhance the report by using ______ statements to:

*define how each variable is used in the report
*assign formats to variables
*specify report column headers and column widths
*change the order of the rows in the report
True or False: You can define options in the DEFINE statement in any order.
For the define statement in the report procedure, the ________ usage for numeric variables:
*uses a defualt statistics of SUM
*has no effect when producing a listing report that contains character variables, so the original data value is displayed.
In define statement for the report procedure, the character variable type produces a _______ report and _______ usage type as the default.
listing, display
In the define statement of the report procedure, if there is a ______ stored in the descriptor portion of the data set, it is the default header.
In the define statement of PROC REPORT, ______ assigns a format to a variable and _______ controls the width of a report column.
format=, width=
________ orders the rows in the report from the REPORT procedure.

Orders the report in _______ order. Include the _________ option in the DEFINE statement to force the order to be that.
*Suppresses repetitious printing of values.
*Does NOT need data to be previously ________.
order, ascending, sorted
Use the REPORT procedure to create a summary report by defining variables as ________ variables.

These variables that have the same values are collapsed into a single ____ in the report.
group, row
For PROC REPORT you can define more than one variable as a ______ variable.

Nesting of group variables is determined by the order of the variables in the ________ statement.
group, column
If you have a group variable, there must be no _______ or _____ variables.
*Group variables produce _______ reports.
*_______ and _______ variables produce ________ reports
display, order, summary, display, order, listing
Default usage for numeric variables is ______ with a default statistics of ______.

*If the report contains _____ variables, the report displays the sum of the numeric variables' values for each group.
*If the report contains at least one _____ or ______ variable and no group variables, the report lists all of the values of the numeric variable.
*If the report contains only ________ variables, the report displays gradn totals for the numeric variables.
analysis, sum, group, display, order, numeric
In defining analysis variables in the report procedure, to specify a statistic other than SUM, type the name of the statistic after the slash in the _____ statement.
You can use an _______ statement to add
* grand total to the top or bottom of the report
* line before the grand total
* line after the grand total
To print grand totals in the report procedure the options in the rbreak statement are:

_________ prints the total

___ prints a single line above the total.

___ prints a double line above the total.

___ prints a single line below the total.

___ prints a double line below the total.
summarize, ol, dol, ul, dul
You can use the _________ and ______ options in the PROC REPORT statement to make the report more readable.
headline, headskip
The report writing features of PROC _________ include

* control of table construction
* differentiating between classification variables and analysis variables
* specifiying statistics
* formatting of values
* labeling variables and statistics
True or False: In the general form of PROC TABULATE, a class statement and a var statement are both required to be specified.
A _______ statement in PROC TABULATE identifies variables to be used as classification, or grouping, variables. Examples: Location, Gender, JobCode
Class variables :
* can be _________ or _________.
* identify classes or categories ono which ___________ are done.
* represent discrete categories if they are _________.
numeric, character, calculations, numeric
A ___ statement in PROC TABULATE identifies variables to be used as analysis variables. Examples are Salary, CargoWt, and Revenue.
In PROC TABULATE, Analysis variables:
* are always _______
* tend to be __________
* are appropriate for calculating averages, sums, or other statistics
numeric, continuous
In PROC TABULATE, a _______ statment identifies _______ structure and format.
table, table
In PROC TABULATE, you specify the table format and the desired statistics with expressions in the TABLE statement.

A simple expression contains _______ and _________.

________ include
elements, operators, elements
TABLE statement operators are:

_______ - go to a new table dimension

_______ - concatenate table information

_______ - cross, nest, subroup information
comma, blank, asterisk
If there are only ______ variables in the TABLE statement in PROC TABULATE, the default statistic is N, or number of non-missing values.
In PROC TABULATE, the ______ statement can be used to subset the data.
In PROC TABULATE, the _____ keyword generages a total for the dimension in which it is specified.
In PROC TABULATE, if there are analysis variables in the TABLE statement, the default statistic is _______.
In PROC TABULATE, to format the statistics in cells, use the ______ option.
True or False: The FORMAT statement of PROC TABULATE cannot be used to control data values in the exterior of the report, only within cells.
In PROC TABULATE, to specify a different statistic in the cells, follow the analysis variable with the ______ operator and the desired statistic.