• 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
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/32

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

32 Cards in this Set

  • Front
  • Back

What does a PROC PRINT statement do?

Displays all observations, all variables, and an Obs column on the left side




PROC PRINT data=orion.sales;


Run;

What does a VAR statement do in a PROC PRINT statement?

Selects variables to include in the report and specifies their order




PROC PRINT data=orion.sales;


Var First_Name Last_Name Salary;


Run;

What does a SUM statement do in a PROC PRINT statement?

Calculates and displays report totals for the requested NUMERIC variables




PROC PRINT data=orion.sales;


Var First_Name Last_Name Salary;


sum Salary;


Run;

What does a WHERE statement do in a PROC PRINT statement?

Selects the observations that meet the criteria specified in the WHERE statement




PROC PRINT data=orion.sales;


Var First_Name Last_Name Salary;


where Salary<25500;


sum Salary;


Run;

What does a NOOBS option do in a PROC PRINT statement?

Suppresses the Obsevation column in the print out




PROC PRINT data=orion.sales NOOBS;


Var First_Name Last_Name Salary;


sum Salary;


Run;

What is the comparison operator for equal to?

= or EQ




WHERE gender = 'M';


WHERE gender eq 'M';

What is the comparison operator for Not Equal To

^= or ~= or NE




WHERE salary ^= .;


WHERE salary ~= .;


WHERE salary ne .;




Prints salary that does not equal missing value

What is the comparison operator for Greater Than

> or GT




WHERE salary>50000;


WERE salary GT 50000;

What is the comparison operator for Less Than

< or LT


WHERE salary<50000;


WHERE salary LT 50000;



What is the comparison operator for Greater Than or Equal?

>= or GE


WHERE salary >= 50000;


WHERE salary GE 50000;



What is the comparison operator for Less than or equal?

<= or LE


Where salary <= 50000;


WHERE salary LE 50000;

What is the comparison operator for equal to one of a list?

IN




WHERE Country in ('AU' 'US');


WHERE OrderType in (1,2,3);




The value list in the IN operator must be enclosed in parenthesis and separated by either commas or blanks. Character values must be enclosed in quotation marks

What does the NOT operator do?

The NOT operator modifies a condition by finding te complement of the specified criteria




WHERE city NOT in ('LONDON', 'ROME', 'PARIS');

Create a WHERE statement to subset by Country and Job_Title




PROC PRINT data=orion.sales NOOBS;


var Last_Name First_Name Country Job_Title;



WHERE country = 'AU' and


Job_Title contains 'Rep';


run;

What does a CONTAINS option do in a PROC PRINT statement?

Selects observations that include the specified substring




Where Job_Title contains 'Rep';


Where Job_Title ? 'Rep';




*Case Sensitive

What are the six special WHERE operators that can only be used in WHERE expressions?

1) Contains (Char) - includes substring


2) Between-And (Char/Num) - an inclusive range


3) Where Same And (Char/Num) - Augment WHERE statement


4) IS NULL (Char/Num) - A missing value


5) IS MISSING (Char/Num) - a missing value


6) LIKE (Char) - Matches a pattern

What does the BETWEEN-AND operator do?

Selects observations in which the value of a variable falls within an inclusive range of values




Where salary between 50000 and 100000;


Where salary not between 50000 and 100000;


Where Last_Name between 'A' and 'L';


Where Last_Name between 'Baker' and Gomez';

Equivalent statements for the BETWEEN-AND operator

Where salary between 50000 and 100000;


Where salary >= 50000 and salary <=100000;


Where 50000<=Salary<=100000;

What does the WHERE SAME AND operator do?

Add more conditions to an existing WHERE expression




PROC PRINT data=orion.sales;


where country='AU' and Salary <30000;


where same and Gender='F'


var First_Name Last_Name Gende Salary Country;


run;



WHERE SAME AND is same as....

Where also

What does the IS NULL operator do?

Selects observations in which a variable has a missing value




Where employee_ID is null;


Where employee_ID is not null;




Where employee_ID = ' ';


Where employee_ID= .;





What does the IS MISSING operator do?

Selects observations in which a variable has a missing value




Where Employee_ID is missing;


Where Employee_ID is not missing;




Where Employee_ID=' ';


Where Employee_ID= .;



What does the LIKE operator do?

Selects observations by comparing character values to specified patterns.




a % sign specifies any number of characters can occupy that position


ex: Where name like '%N';




a _ specifies that exactly one character can occupy that position


ex: Where name like 'T_M';




Where name like 'T_M%'

What does the SORT procedure do?

rearranges the observations in the input data set based on the values of the variable or variables listed in the BY statement




Proc sort data=orion.sales;


out=work.sales;


by Salary;


run;

What does the OUT statement do in a PROC SORT statement?

Out=new library.data set




This creates a new, sorted data set instead of writing over original data set



What is the default for a PROC SORT step?

Ascending

What is shorthand for descending?

DESC

Where titles or footnotes in Proc Print step?

Before Proc Print

How many titles can you have?



1-10




TITLEn'text'




title1 'This is the first Line';



If you want to end a title or footnote, what do you do

title;


footnote;

What does the LABEL statement do in a PROC PRINT step?

Changes the names of the variables




Proc Print data=orion.sales label;


var Employee_ID Last_Name Salary;


LABEL Employee_ID='Sales ID';


Last_Name='Last Name';


Salary='Annual Salary';


run;

What does the SPLIT= option do in a PROC PRINT step?

Specifies a split character to control line breaks in column headings




Proc Print data=orion.sales split='*';


var Employee_ID Last_Name Salay


LABEL Employee_ID='Sales ID'; Last_Name='Last*Name'; Salary='Annual*Salary';


run;




Essentially this a WRAP TEXT function