SAS Advanced Programming Certification Exam

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which statement is needed in the following PROC FCMP step to end the syntax for the ToCelsius function? proc fcmp outlib=pg3.funcs.tempconvert; function ToCelsius(Fah); Cel=round((Fah-32)*5/9,.01); return(Cel); run; a) END; b) ENDSUB; c) ENDFUNC; d) ENDFUNCTION;

B The ENDSUB statement ends the syntax for a custom function.

What is a SAS array? a) a SAS table b) a SAS column c) a permanent attribute of a SAS table d) a temporary grouping of SAS columns

D An array is a temporary grouping of SAS columns that are arranged in a particular order and identified by an array name

True or False: the macro processor modifies SAS code after it is compiled

FALSE

True or False: by default, the EXCEPT, INTERSECT, and UNION set operators remove duplicate rows from the query results.

TRUE Although they do not remove the duplicate rows at the same point, the EXCEPT, INTERSECT, and UNION set operators remove duplicate rows.

Which of the following expressions creates a new column in the SELECT clause? a) Salary*.01 as Increase b) Bonus=Salary*.03 c) Job_Level as Scan (Job_Title, 1, ' ') c)Salary*.03 Bonus

a) Salary*.01 as Increase An equal sign is not allowed in the expression in the SELECT clause when creating a new column. To assign a name that is referred to as an alias in PROC SQL, use the keyword AS followed by a valid SAS name, not the expression.

Which %DO statement does not contain a syntax error? a) %do i=1 to 5; b) %do %until(&X>10); c) %do %while &X<10; d) %do i=A, B, C;

b) %do %until(&X>10);

Which of the following CASE expressions is correct? a) case Age when 20 <= Age <= 29 then '20-29'; b) case when 20 <= Age <= 29 then '20-29';

b) case when 20 <= Age <= 29 then '20-29'; When you need to use a comparison operator other than equal, you use a simple case expression.

Which CALL statement correctly creates a macro variable from the result of the numeric expression amount/number so that the macro variable shows the value with a dollar sign and no decimal places? a) call symputx('avg', amount/number); b) call symputx('avg', amount/number(dollar8.)); c) call symputx('avg', put(amount/number, dollar8.));

c) call symputx('avg', put(amount/number, dollar8.));

Which of the following TITLE statements correctly references the macro variable month? a) title 'Total Sales for &month'; b) title "Total Sales for 'month'"; c) title "Total Sales for &month"; d) title "Total Sales for &month";

c) title "Total Sales for &month";

Which statement correctly creates the user-defined path macro variable with the value of s:/workshop/data? a) %user path = s:/workshop/data; b) %macro path= s:/workshop/data; c) %path = s:/workshop/data; d) %let path= s:/workshop/data;

d) %let path= s:/workshop/data; To create a user-defined macro variable, you use the %LET statement and specify the name of the macro variable, followed by an equal sign, and then the text string that you want to store.

Which option displays the resolved values of macro variables in the log? a) %LET b) MPRINT c) MACVAR d) SYMBOLGEN

d) SYMBOLGEN

In which of the following queries can you replace the SAS summary function MEAN with the ANSI summary function AVG and get the same results? a) select mean(Qtr1, Qtr2, Qtr3, Qtr4) as Mean_Annual from orion.employee_donations; b) select Employee_ID, mean(Qtr1, Qtr2, Qtr3, Qtr4) as Mean_Annual from orion.employee_donations; c) select mean(of Qtr1:) as Mean_Qtr_1 from orion.employee_donations; d) select mean(Qtr1) as Mean_Qtr_1 from orion.employee_donations;

d) select mean(Qtr1) as Mean_Qtr_1 from orion.employee_donations; Unlike most SAS summary functions, ANSI summary functions can take only a single argument. Also, because PROC SQL is ANSI standard, shortcuts to reference a range of variables in an argument list within a function are not acceptable in PROC SQL as they are in other SAS procedures.

Which WHERE clause subsets rows based on NewSalary, an alias created in the SELECT clause? a) where 75000<=Salary calculated <=100000 b) where NewSalary >=75000 and NewSalary<=100000 c) where 75000<= calculated Salary<=100000 d) where 75000<= calculated NewSalary<=100000

d) where 75000<= calculated NewSalary<=100000 The SAS keyword CALCULATED enables you to use the results of an expression in the same SELECT clause or in the WHERE clause.

Which of the following can be conditionally placed onto the input stack? a) only whole steps b) only whole steps or whole statements c) only whole statements or pieces of text within a statement d) whole steps, whole statements, or pieces of text within statements

d) whole steps, whole statements, or pieces of text within statements

Which of the following can be stored in a macro variable? a) 9.2 b) 10:32 c) 1352050 d) Soccerballs e) all of the above

e) all of the above All of these can be stored as a text string in a macro variable.

What is the value of the column Position? Position = prxmatch('/Dutch/', 'Sawyer Dutch Kenai');

8 PRXMATCH searches for a pattern match and returns the position at which the pattern is found. The string Dutch is found starting in the eighth position.

Which statement is false regarding an ARRAY statement? a) It is an executable statement b) It can be used to create columns c) It must contain either all numeric or all character elements d) It must be used to define an array before the array name can be referenced

A An ARRAY statement is not an executable statement. It is a compile-time statement that defines the temporary grouping of columns.

Which array statement correctly loads the following values into the array survey? 4 5 3 2 4 5 5 2 4 3 a) array survey[2,5] (4, 5, 3, 2, 4, 5, 5, 2, 4, 3); b) array survey[2:5] (4, 5, 3, 2, 4, 5, 5, 2, 4, 3); c) array survey[5:2] (4, 5, 3, 2, 4, 5, 5, 2, 4, 3); d) array survey[5,2] (4, 5, 3, 2, 4, 5, 5, 2, 4, 3);

A In a 2D array, elements are referenced using two numbers. The first number corresponds to the row, and the second number corresponds to the column. The dimension values are separated with a comma. Initial values are loaded into a 2D array by specifying the values one row at a time, left to right.

Which statement creates the TEST array that references the columns Test1, Test2, Test3, Test4, Test5, and Final? a) array test[6] Test1-Test5 Final; b) array test[6] (Test1-Test5 Final); c) array test[6] Test1 to Test5 Final; d) array test[6] Test1 to Test5, Final;

A Parentheses, the word to, or commas are not used in the ARRAY statement to reference columns. A hyphen can be used to reference a numbered range list.

Which picture statement displays a nine digit account number with five leading asterisks followed by the last four digits, such as *****6789? a) picture maskfmt low-high = '9999' (prefix = '*****'); b) picture maskfmt (prefix = '*****') low-high = '9999'; c) picture maskfmt low-hihg = '999999999' (prefix = '*****'); d) picture maskfmt (prefix = '*****') low-high = '999999999';

A The four-digit selector truncates the leading digits and the PREFIX= option specifies a character string to place in front of the formatted value. The PREFIX= option must be after the template.

Based on the following DECLARE statement, which methods correctly read the first and last rows in the hash iterator object? (Select all that apply) declare hiter State('StateSort'); a) State.first() b) StateSort.first() c) State.last() d) StateSort.last()

A, C The syntax for the FIRST and LAST methods is hiter-object-name.first() and hiter-object-name.last()

Which of the following are format options that can be placed after the format name? (Select all that apply) Picture format-name (format-options) value-or-range-1 = 'template-value' (template-options) value-or-range-2 = 'template-value' (template-options)...; a) DEFAULT= b) DATATYPE= c) MULTIPLIER= d) ROUND

A, D DEFAULT= and ROUND are format options that are listed after the format name. DEFAULT= specifies the default length of the formatted value. ROUND rounds the value to the nearest integer. DATATYPE= and MULTIPLIER= are template options that go after the template value. DATATYPE= enables the use of directives to format date, time, or datetime values. MULTIPLIER= specifies a number to multiply the value by.

Complete the FUNCTION statement to create a function named TitleName that consists of two character arguments. proc fcmp outlib=pg3.funcs.misc; function TitleName_______ $50; if Gender='F' then return(catx(' ', 'Ms.', Name)); else if Gender='M' then return(catx(' ', 'Mr.', Name)); endsub; run; a) (Name, Gender) b) (Name$, Gender$) c) ('Name' $, 'Gender' $) d) ('Name $', 'Gender$')

B Character arguments must be followed by a dollar sign and separated with a comma. No quotation marks are needed.

Which data step generates the output table work.rotate? work.class_quiz: Name, Quiz1, Quiz2, Quiz3, Quiz4, Quiz5 work.rotate: Name, Test, Score a) data work.rotate (drop=Quiz1-Quiz5); set work.class_quiz; array q[5] Quiz1-Quiz5; do Test=1 to 5; Score=q[Test]; end; run; b) data work.rotate(drop=Quiz:); set work.class_quiz; array q[5] Quiz:; do Test=1 to 5; Score=q[Test]; output; end; run;

B The OUTPUT statement generates a row for each iteration of the DO loop, resulting in the transposition of the data. Without the OUTPUT statement, the DATA step outputs only Quiz5 for each name.

Which statement is false regarding the PICTURE statement? a) the PICTURE statement can be used only in the PROC FORMAT step b) the PICTURE statement specifies character strings to display for character values c) the PICTURE statement can create custom date, time, and datetime formats d) the PICTURE statement creates a format that specifies a template for displaying numeric values

B The PICTURE statement creates a format that specifies a template for displaying numeric values, including dates, times, and datetimes. The PICTURE statement is valid only in the FORMAT procedure. The VALUE statement creates a format that specifies character strings to display for values, both character and numeric.

Which PICTURE statement generates a date format that produces the following results when used with the Date column? 21800 > 9/8/2019 a) picture NoZero low-high = '%m/%d/%Y' (datatype = date); b) picture NoZero (default=10) low-high='%m/%d/%Y' (datatype=date); c) picture NoZero low-high='%m/%d/%Y' (datatype=date default=10); d) picture NoZero (default=10) low-high='%m/%d/%Y' (datatype=datetime);

B Without the DEFAULT= option, the length for the format is 8 characters, but 10 characters are needed. The DEFAULT= option goes after the format name. The DATATYPE= value must match the data, which is Date in this example. %m displays a one or two digit month, %d displays a one or two digit day, and %Y displays a four digit year.

Which data step multiplies the values of Quiz1 through Quiz5 by 10? data work.Step1; set work.class_quiz; array q[*] Quiz:; do i=1 to dim(Quiz); q[i]=q[i]*10; end; run; data work.Step2; set work.class_quiz; array q[*] Quiz1-Quiz5; do i=1 to dim(q); q[i]=q[i]*10; end; run; a) step1 b) step2 c) both d) neither

B the DIM function is used to return the number of elements in the Q array

Which picture statement generates the following results when the custom format is used with the Number column? Number: 76.54, 0.32, 1.82 a) picture FmtA low-high = '999.99'; b) picture FmtB low-high = '000.00'; c) picture FmtC low-high = '009.99'; d) all of the above

C A nonzero digit selector must precede the decimal point. Using a zero digit selector before the decimal point suppresses the decimal point.

Which statement is false regarding a hash object? a) a hash object is an in-memory table that contains key and data components b) the key and data components can be numeric, character, or both c) the data must be in sorted order by the key components d) the hash object is created at execution time

C The data does not need to be sorted by the key components

What is the value of TwoD5 after the first iteration of the data step? work.array_data: Name1 (Jack, Christy) Name 2 (Mary, John) Name 3 (Sally, Marty) data work.new_data(drop=Row Column); array TwoD[2,3] $; retain TwoD1-TwoD6; if _N_=1 then do Row=1 to 2; set array_data; array OneD[3] Name1-Name3; do Column=1 to 3; TwoD[Row,Column]=OneD[Column]; end; end; run; a) . b) Sally c) John d) blank

C TwoD1=Jack TwoD2 = Mary TwoD3= Sally TwoD4= Christy TwoD5=John TwoD6=Marty

What does the value -1 for the times argument specify in the PRXCHANGE function? PRXCHANGE(perl-regular-expression, times, source) a) Search and replace the middle occurrence b) Search and replace one time from the end of the source c) Search and replace until the end of the source is reached d) Search and replace one time from the beginning of the source

C the second argument of the PRXCHANGE function is the number of times to search and replace. The value -1 specifies to search and replace until the end of source is reached.

Which of the following statements is true regarding the hash iterator (hiter) object? a) a hiter object points to an external SAS table b) ascending is the only valid direction for moving through the hiter object c) you can move through the hiter object using either the key or data components d) you must declare and define the hash object, which is referenced by the hiter object, before the DECLARE statement for the hiter object

D A hash iterator object is associated with a hash object. The hash object must be declared and defined before declaring the hash iterator object.

Which statement is true concerning the following PROC FCMP statement? proc fcmp outlib=pg3.funcs.misc; a) the custom function will be stored in the SAS table pg3.misc b) the custom function will be stored in the pg3 package within the SAS table funcs.misc c) the custom function will be stored in the misc folder within the SAS package pg3.funcs d) the custom function will be stored in the misc package within the SAS table pg3.funcs

D Custom functions are stored in a package within a SAS table. The OUTLIB= option consists of a three-level name. The first two levels refer to the SAS table (libref.tablename), and the third level refers to the package.

Which declare statement has correct syntax? a) declare hash class (dsn:pg3.class_birthdate); b) declare hash class(data=pg3.class_birthdate); c) declare hash class(data='pg3.class_birthdate); d) declare hash class(dataset:'pg3.class_birthdate');

D DECLARE HASH object-name(DATASET: 'data-set-name <(data-set-options)>');

Which global option specifies the table that SAS searches for a package that contains the custom function? a) FCMPLIB= b) LIBCMP= c) OUTLIB= d) CMPLIB=

D The CMPLIB= option specifies the table (or tables) that SAS searches for a package that contains the desired function.

Which statement is false concerning the following array statement? array TwoD[2,3] $ _temporary_; a) Six array elements are created in the PDV b) The array elements are automatically retained c) The array elements will not be in the final output table d) The array elements can be referenced using one number

D This ARRAY statement creates six array elements in the PDV that must be referenced using the array name. The array elements are retained in the PDV and dropped from the output table. The array elements must be referenced using two numbers: a row number and a column number.

Complete the array statement to create temporary array elements that have initial values of 100, 129, 104, and 119. array scored[4] _____________ a) temporary (100 129 104 119) b) _temporary_ 100 129 104 119 c) (temporary) 100, 129, 104, 119 d) _temporary_ (100, 129, 104, 119)

D Use _TEMPORARY_ to create temporary array elements. The list of initial values must be enclosed in parentheses and separated by commas or blanks.

What happens when you use this highlighted statement in your program: if _N_=1 then do; if 0 then set pg3.stocks(keep=Stock Date Open Close); end; a) SAS adds the columns to the PDV b) the set statement does not execute c) the columns are initialized to missing d) all of the above

D the non-executing SET statement creates the columns in the PDV and initializes the columns to missing. This statement replaces the need for the LENGTH statement and the CALL MISSING routing when working with hash objects.

True or False: when an autocall macro is called, it is stored permanently as a compiled macro in a macro catalog until you delete it.

FALSE

True or False: You have been programming in a specific database implementation of SQL and want to begin using PROC SQL. All of your previous knowledge of keywords, features, and enhancements will transfer over when using PROC SQL.

FALSE Although SQL has a set of standards, it is important to understand that database management systems offer different implementations of the standard SQL. Database management systems like Oracle, Teradata, SQL Server, Postgres, and a variety of others all follow ANSI standard SQL. However, some might have keywords, features, and enhancements that are slightly different between systems.

True or False: In this PROC SQL program, the two SELECT statements use the orion.employee_donations table and generate the same results. proc sql; select count(*) from orion.employee_donations; select count(Qtr1) from orion.employee_donations; quit;

FALSE COUNT(*) counts the total number of rows in a table or in a subset. However, when you specify a column as an argument for COUNT, the function counts the number of rows in the table or in a subset that have a nonmissing value for that column.

True or False: The RETURN statement can have the custom function return multiple values.

FALSE The RETURN statement can return only a single value.

True or False: data components must be defined as PDV columns, but key components do not need to be defined as PDV columns

FALSE The key and data components must be DATA step columns in the PDV. You can use a LENGTH statement or a non-executing SET statement to add them to the PDV

True or False: the PRXPARSE function returns a character string that is used by other PRX functions and call routines.

False The PRXPARSE function returns a pattern identifier number that is used by other PRX functions and call routines

Yes or No: Given the table revenue below, you want to store the sum of Revenue in a macro variable named TotalRevenue. Does the following query store the exact value of 900000000 in TotalRevenue? proc sql; select sum(Revenue) into :TotalRevenue from revenue; quit; revenue: Product Revenue Shirt $200,000,000 Shoes $300,000,000 Pants $400,000,000

NO The query stores the value 9E8. When storing a number, SAS uses the BEST8. format. If the number is larger than eight digits, scientific notation is often used.

Yes or No: based on the following declare statement, will the output method create a sorted table? declare hash StateSort (ordered); ... StateSort.output(dataset: 'work.USstates';

No The ORDERED argument with 'ascending' or 'descending' is needed in the DECLARE statement

True or False: automatic and user-defined macro variables can store only text strings

TRUE

True or False: the following ARRAY statements contain valid syntax for creating the numeric columns Target1, Target2, Target3, and Target 4. array T[4] Target1-Target4; array Target[4];

TRUE An ARRAY statement can be used to create new columns in the PDV. If Target1 through Target4 do not exist in the PDV, they will be created. If array elements are not specified in an ARRAY statement, SAS uses the name of the array and adds a numeric suffix to create the specified number of columns.

True or False: an in-line view can return multiple rows and columns

TRUE An in-line view acts as a virtual table and can return values from one column or multiple columns.

True or False: in your PROC SQL code, you can include SAS features that do not conform to the ANSI standard.

TRUE In PROC SQL, you can include SAS enhancements that go beyond the ANSI standard.

True or False: SAS/ACCESS technology enables you to read data that is in a third party DBMS from within SAS

TRUE SAS/ACCESS technology is a family of interfaces, each licensed separately, that enables you to read data in a third-party DBMS from within SAS. SAS/ACCESS technology for relational databases provides an interface engine between SAS software and data in other vendors' database management systems.

True or False: PROC SQL with set operators handles columns and rows, depending on the specific set operator and keywords used in the set operation.

TRUE The INTERSECT, EXCEPT, and UNION set operators align columns by position and remove duplicate rows by default. The OUTER UNION set operator includes all columns and rows by default.

True or False: To guarantee the order of the rows in the output, you must use an ORDER BY clause.

TRUE To guarantee the order of the rows in the output, you must use an ORDER BY clause.

True or false: the LAG function can retrieve the previous value of a numeric or character column.

True

True or False: Perl regular expressions in the PRXMATCH function must start and end with a delimiter.

True A Perl regular expression within the PRXMATCH function must start and end with a delimiter such as the forward slash.

Given the following DATA step, what is the value of USNum and WordNum? data TextCount; Text='AUSTRALIA, ITALY, AUSTRIA, US'; USNum=count(Text,'US'); WordNum=countw(Text); run;

USNum = 3 WordNum = 4 The COUNT function counts the number of times that a specified substring appears within a character string. The COUNTW function counts the number of words in a character string. A default list of delimiters is used.

Why is StateName specified in the DEFINEKEY and DEFINEDATA methods? declare hash StateSort(ordered: 'ascending'); StateSort.definekey('StateName'); StateSort.definedata('StateName','StatePop2017'); . . . StateSort.output(dataset: 'work.USstates');

When using the OUTPUT method, key components are not automatically stored in the output table. To include key components in the output table, define key components as both key and data components

Which statement is false regarding Perl regular expressions? a) Perl regular expressions are limited to 32 bytes b) Perl regular expressions consist of metacharacters c) Perl regular expressions are used in SAS within the PRX functions d) Perl regular expressions are sequences of strings that define patterns

a SAS does not impose a byte size limitation for Perl regular expressions.

Which technique does not create macro variables at execution time? a) %LET statement b) SYMPUTX routine c) SQL INTO clause

a) %LET statement

Assume that you began your SAS session today. Which of the following statements correctly sets the macro variable CurrDate to today's date expressed as a calendar date? a) %let currdate = %sysfunc(today(), worddate.); b) %let currdate = %sysfunc(today()); c) %let currdate = today();

a) %let currdate = %sysfunc(today(), worddate.);

Which of the following reports macro definitions runs the weekly macro if the day of the week is Friday? a) %macro reports; %daily %if &sysday=Friday %then %weekly; %mend reports; b) %macro reports; %daily %if &sysday=Friday %then %do %weekly; %mend reports; c) %macro reports; %daily %if &sysday="Friday" %then %weekly; %mend reports;

a) %macro reports; %daily %if &sysday=Friday %then %weekly; %mend reports;

Which of the following statements does not correctly display the value of the macro variable Month in the SAS log? a) %put(month); b) %put &month; c) %put &=month; d) %put The value of macro variable month is &month;

a) %put(month);

Which of the following options uses an ANSI standard column modifier to create a label that is displayed as the heading for a column in the output? a) 'Employee Number' b) Employee Number c) Label= 'Employee ID' d) Header=Employee Reference Number

a) 'Employee Number' The LABEL= column modifier is not ANSI standard. It is a SAS enhancement to specify labels. You can use the ANSI column modifier, the LABEL= column modifier, or both within the same SELECT clause.

If the values returned by the YEAR function are .(missing), 2018, 2019, and 2020, which value for year is displayed first in the output based on this code? proc sql; select Employee ID, Employee_Term_Date format=date9., year(Employee_Term_Date) as year from orion.employee_payroll where Employee_Gender='M' and Marital_Status='S' order by year; quit; a) .(missing) b) 2018 c) 2019 d) 2020

a) .(missing) The default of the ORDER BY clause specifies to display values from the smallest to the largest numeric or character value. PROC SQL treats null or missing values as the smallest possible value.

How many tokens are in this statement? plot date*revenue='$'/vref= '30jun2002'd; a) 11 b) 12 c) 13 d) 18

a) 11

Which system option can you use to monitor macro execution? a) MLOGIC b) MPRINT c) SYMBOLGEN d) MCOMPILENOTE=ALL

a) MLOGIC

Which PROC SQL option would you use to produce a report that includes the row number in the report? a) NUMBER b) OBS c) ROWNUM d) ROW

a) NUMBER The NUMBER option specifies whether the SELECT statement includes the row number of the data as teh rows are retrieved.

You're familiar with the Oracle SQL implementation. You begin to use PROC SQL but don't want to learn any of the SAS enhancements and functions. You would like to continue to use the Oracle SQL implementation inside SAS. Which method would you use to interact with the Oracle database? a) SQL pass-through (explicit pass through) b) LIBNAME statement (implicit pass through)

a) SQL pass-through (explicit pass through) To accomplish your task, the best option is to use the SQL pass-through facility, which enables you to send DBMS-specific SQL statements directly to a DBMS for execution. The syntax executes as if you are simply coding inside the database, and processing occurs inside the database.

Which query finds the ID, Job_Title, and Salary values of all employees in the Engineering Department? a) select ID, JOb_TItle, Salary from staff where ID in (select ID from staff where Department = "Engineering"); b) select ID, Job_Title, Salary from staff where ID = (select ID from staff where Department = "Engineering");

a) select ID, JOb_TItle, Salary from staff where ID in (select ID from staff where Department = "Engineering"); The IN operator is required in the WHERE clause because it can accept multiple values from the subquery.

You want to produce a report that selects the Make, Model, and MPG_City columns from the sashelp.cars table. Which of the following queries is correct? a) select Make, Model, MPG_City from sashelp.cars; b) select Make Model MPG_City from sashelp.cars; c) from sashelp.cars select Make Model MPG_City; d) from sashelp.cars select Make, Model, MPG_City;

a) select Make, Model, MPG_City from sashelp.cars; You specify the names of the columns, separated by commas, in the SELECT clause, and specify the input table in the FROM clause.

Which of these queries places one value from the first row returned by the SQL query into a macro variable? a) select avg(Salary) into :MeanSalary from store.employee; b) select avg(Salary) into %MeanSalary from store.employee; c) select avg(Salary) into &MeanSalary from store.employee;

a) select avg(Salary) into :MeanSalary from store.employee; The INTO clause creates one macro variable and assigns the value from the first column of the first row of the query result. The name in the INTO clause is preceded by a colon.

Which of the following correctly creates a macro variable in a PROC SQL step? a) select fee format=dollar8. into :daily_fee from sasuser.all; b) select fee format=dollar8. into daily_fee from sasuser.all; c) if location= 'Boston' then do; call symputx('region', East); end;

a) select fee format=dollar8. into :daily_fee from sasuser.all;

Given the table revenue below, you want to store the sum of Revenue in a macro variable named TotalRevenue. Which of the following queries stores the exact value of $900,000,000 in the macro variable TotalRevenue? a) select sum(Revenue) format=dollar16. into :TotalRevenue from revenue; b) select sum(Revenue) into :TotalRevenue format=dollar16. from revenue; c) select sum(Revenue) into :TotalRevenue from revenue;

a) select sum(Revenue) format=dollar16. into :TotalRevenue from revenue; Use the FORMAT= column modifier in the SELECT clause to format the summarized value.

Which of the following lines of code correctly references a macro variable? a) title "The Sales of the &Country Offices"; b) where salary > 'avgSal'; c) title 'The Sales of the &COuntry Offices';

a) title "The Sales of the &Country Offices"; When you reference a macro variable, you must precede the macro variable name with an ampersand. You can reference macro variables anywhere in SAS code. When you reference a macro variable within a text string, you must enclose the text string within double quotation marks. The macro processor does not resolve macro variable references that appear within single quotation marks.

Which statement is true about using the keyword CORR in a set operation? a) when used with the EXCEPT operator, the CORR keyword instructs PROC SQL to position by same-name columns and eliminate columns that do not have the same name in both tables from the final results b) when used with the INTERSECT operator, the CORR keyword instructs PROC SQL to overlay columns by position in the final results c) when used with the OUTER UNION operator, the CORR keyword instructs PROC SQL to eliminate columns that do not have the same name in both tables from the final results

a) when used with the EXCEPT operator, the CORR keyword instructs PROC SQL to position by same-name columns and eliminate columns that do not have the same name in both tables from the final results When the CORR keyword is used with EXCEPT and INTERSECT, it instructs PROC SQL to align columns that the query results have in common. The OUTER UNION CORR aligns by like column names in both tables and includes columns that do not have the same name in both tables.

Which data step calculates the difference in Tavg between consecutive rows to generate the following output table? a) data TempDiff; set pg3.weather_sydney_daily2017 (keep=Date Tavg); if _N_>1 then do; TempDiff=Tavg-lag(Tavg); end; run; b) data TempDiff(drop=Day1); set pg3.weather_sydney_daily2017 (keep=Date Tavg); Day1=lag(Tavg); if _N_>1 then do; TempDiff=Tavg-Day1; end; run;

b The LAG function stores previous values in a queue when the LAG function is executed. If the LAG function is not executed due to a false condition, the previous value is not stored. By using the LAG function outside of a conditional statement, the previous value is stored.

Which Perl regular expression replaces the string PG3 with the string PG3M6? a) 'r/PG3/PG3M6/' b) 's/PG3/PG3M6/' c) 's/PG3M6/PG3/' d) 'r/PG3M6/PG3/'

b s (specifies a substitution regular expression) / (beginning delimiter for regular expression) PG3 (matches the letters PG3) / (middle delimiter that separates a search pattern from a substitution pattern) PG3M6 (substitutes with the letters PG3M6) / (ending delimiter for regular expression)

Complete the if statement below to output the rows only when the value of the Name column is found in the Tests hash object. if ___________ then output; a) Tests.find (key: 'Name') b) Tests.find (key:Name) = 0 c) Tests.find (key: 'Name') > 0 d) Tests.find (key:Name) ne 0

b the FIND method returns a zero if the key value is found (match) in the associated hash object. A nonzero value is returned when a key value is not found (non-match)

Which code produces a report of only the matches from the employee_donations and employees tables? The results should include each column once. a) select Employee_ID, Qtr1, Qtr2, Qtr3, Name from employee_donations as d inner join employees as e on Employee_ID = Employee_ID; b) select e.Employee_ID, Qtr1, Qtr2, Qtr3, Name from employee_donations as d inner join employees as e on d.Employee_ID = e.Employee_ID; c) select * from employee_donations as d inner join employees as e on d.Employee_ID=e.Employee_ID;

b) In the FROM clause, you specify the first table and the keywords INNER JOIN, followed by the second table. Following the table names and join type, the syntax requires an ON clause to describe the join criteria for matching rows in the tables. When you refer to tabels that have a same-named column, you must qualify the column names to specify the location of each column.

Which of these will not be sent to the macro processor? a) &name b) '&name' c) &name d) "%name"

b) '&name'

If this program is run in a new SAS session, how many macro variable/value combinations are displayed in the log? %macro test(y); %let x=y; %put _local_; %mend test; %test(5) a) 1 b) 2 c) 3 d) can't be determined

b) 2

When this program ends execution, what is the value of X? %macro inner; %let x=&y; %mend inner; %macro outer(y); %inner %mend outer; %let x=0; %outer(5) a) 0 b) 5 c) can't be determined

b) 5

You're familiar with using PROC SQL and are connecting to an SQL Server database. You are not familiar with the database implementation of SQL and want to continue using PROC SQL. Which method would you use to interact with the SQL Server database? a) SQL Pass-Through (Explicit Pass Through) b) LIBNAME Statement (Implicit Pass Through)

b) LIBNAME Statement (Implicit Pass Through) The SAS/ACCESS LIBNAME Engine translates your PROC SQL syntax to native DBMS SQL when possible. This is important because SAS SQL and native database SQL can differ. So if you are working with multiple databases, you can learn SAS SQL instead of learning native database SQL implementations and let the engine do the work for you.

In orion.sales, the columns appear in this order: Employee_ID, First_Name, Last_Name, Gender, Salary, Job_Title, Country, Birth_Date, Hire_Date. When you run the following query, in what order do columns appear in the report? proc sql; select Last_Name, First_Name from orion.sales; quit; a) First_Name, Last_Name b) Last_Name, First_Name c) Last_Name, First_Name, Job_Title

b) Last_Name, First_Name In a query's output, the columns appear in the order in which they are listed in the SELECT clause. Columns that are listed in other clauses, but not the SELECT clause, do not appear in output.

You are working with an Oracle database and want to push as much of the processing as possible into the database. Which PROC would be better to use? a) PROC SQL b) PROC FEDSQL

b) PROC FEDSQL PROC FEDSQL is a vendor-neutral ANSI SQL that pushes as much of the processing as possible into the database.

If present, the clauses in a SELECT statement must be in which order? a) SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING b) SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY

b) SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY If present, the clauses must be in this order: SELECT, FROM, WHERE, GROUP BY, HAVING, and ORDER BY, but not all clauses must be present. For example, you can use the WHERE clause and ORDER BY clause and not use the GROUP BY or HAVING clause.

Before you run this query, which of the following changes can you make to prevent SAS from remerging, and still produce a report? select Order_Type, min(Quantity) label = "Min Qty" from orion.order_fact; a) add an ORDER BY clause to sort the output rows by the values of ORder_Type b) add a GROUP BY clause to group by Order_Type c) add an additional column to the SELECT list d) specify the PROC SQL NOREMERGE option

b) add a GROUP BY clause to group by Order_Type The SELECT list in this query specifies both a non-summarized column and a summarized column. By default, SAS remerges unless you either group by Order_Type or remove the non-summarized column. Specifying the NOREMERGE option prevents SAS from remerging, but then PROC SQL does not produce a report.

Suppose you need to use the most up to date data from a complex query and want multiple users to be able to access the information. Which of the following solutions would be best? a) create a table with the complex query and allow users access to the table b) create a view with the complex query and allow users to access the view c) send users the complex query to copy and paste in their queries as an in-line view

b) create a view with the complex query and allow users to access the view A view builds the data when the view is executed and retrieves the most up to date information every time that the view is run.

Which of the following statements creates a new table named results from a query? a) create table results like select ... b) create table results as select ... c) create table results (select...) d) create table results from select ...

b) create table results as select ... To create a table from a query result, you use a CREATE TABLE statement with the new table name and the AS keyword followed by the query. Adding CREATE TABLE at the beginning of the query creates a table instead of results from the query.

Which statement is true about using the keyword ALL in a set operation? a) generally, using the keyword ALL is less efficient because it requires an extra pass through the data b) generally, using the keyword ALL is more efficient because it avoids an extra pass through the data c) PROC SQL does not allow duplicate rows to remain eligible for processing d) the keyword ALL is not an implied part of the OUTER UNION set operator and is not necessary

b) generally, using the keyword ALL is more efficient because it avoids an extra pass through the data Not using the keyword ALL is generally less efficient because it requires PROC SQL to make an extra pass through the data to eliminate duplicate rows.

Which of the following statements about macro variable resolution is false? a) two consecutive ampersands resolve to one ampersand b) if more than two consecutive ampersands precede a name token, the macro processor generates an error message c) the macro processor always rescans a reference that is preceded by multiple ampersands d) rescanning continues until there are no remaining macro triggers that the macro processor can resolve

b) if more than two consecutive ampersands precede a name token, the macro processor generates an error message

Which statement specifies autocall library locations, including autocall macros supplied by SAS and user-defined macros? a) sasmstore=(sasautos, s:/workshop); b) options sasautos=("s:/workshop", sasautos); c) %autocall (sasautos, s:/workshop) d) autocall sasautos=("s:/workshop", sasautos);

b) options sasautos=("s:/workshop", sasautos);

Which of the following statements identifies the syntax error in this query? select Lastname, Firstname from charity.donors where Donation > 1000 and Lastname not in select Lastname from charity.current; a) the subquery requires its own semicolon b) parentheses are required around the subquery c) the subquery must reside inside a HAVING clause d) the subquery must reference the same table as the outer query

b) parentheses are required around the subquery A subquery has to be enclosed in parentheses.

Which query executes correctly in PROC FEDSQL? a) proc fedsql; select EmployeeID, Name, Salary, Department from orion.employee where = "Management"; quit; b) proc fedsql; select EmployeeID, Name, Salary, Department from orion.employee where = 'Management'; quit;

b) proc fedsql; select EmployeeID, Name, Salary, Department from orion.employee where = 'Management'; quit; When using FEDSQL, you must use single quotation marks around a text string in the WHERE clause. Double quotation marks are a SAS enhancement and do not run in FEDSQL.

Which program correctly displays a list of qualified column names in the SAS log? a) proc sql; describe table acme.staff; quit; b) proc sql noexec; select * from acme.staff; quit; c) proc sql list; select * from acme.staff; quit; d) proc sql feedback; select * from acme.staff; quit;

b) proc sql noexec; select * from acme.staff; quit; To display an expanded query, which contains a list of qualified column names in the SAS log, you add the FEEDBACK option to the PROC SQL statement above the SELECT statement.

Which of the following programs positions the TITLE statement correctly so that the title appears in the output? a) proc sql; select Employee_ID from orion.order_fact; quit; title 'Manager Report'; b) proc sql; title 'Manager Report'; select Employee_ID from orion.order_fact; quit; c) proc sql; select Employee_ID from orion.order_fact; title 'Manager Report'; quit;

b) proc sql; title 'Manager Report'; select Employee_ID from orion.order_fact; quit; You must place TITLE and FOOTNOTE statements before the SELECT clause, because in the SQL procedure the SELECT clause runs immediately. Alternatively, you can place the statements before the PROC SQL statement.

The product_dim table contains 481 rows- that is, 1 row for each product that Orion Star sells. All Orion Star products are assigned to 1 of 50 product groups. Which SELECT statement creates a report that shows the number of products in each product group? a) select Product_Group, count(*) as Products from orion.product_dim; b) select Product_Group, count(*) as Products from orion.product_dim group by Product_Group; c) select Product_Group, count(*) as Products from orion.product_dim group by Product_Group, Products;

b) select Product_Group, count(*) as Products from orion.product_dim group by Product_Group; To aggregate summary statistics by the values of the non-summarized column, Product_Group, the query must use a GROUP BY clause that specifies the Product_Group column. This report is grouped by only one column. Also, the GROUP BY clause cannot specify a summarized column, like Products.

Which SELECT statement creates a report that displays only the unique combinations of Customer_Type_ID and Country? a) select distinct Customer_Type_ID Country from orion.customer; b) select distinct Customer_Type_ID, Country from orion.customer; c) select distinct Customer_Type_ID, distinct Country from orion.customer; d) select Customer_Type_ID, Country from orion.customer where distinct Customer_Type_ID and Country;

b) select distinct Customer_Type_ID, Country from orion.customer; To select unique combinations of the values of multiple columns, you place the DISTINCT keyword once in the SELECT clause before the entire column list. Columns must be separated by commas.

Which of the following options enables you to view the values of the macro variables without using them in a report? a) the SYMBOLLOG system option b) the SYMBOLGEN system option c) the NOFEEDBACK PROC SQL option d) the LABEL = option

b) the SYMBOLGEN system option The SYMBOLGEN system option shows you what the macro variable resolves to in the log.

Which statement is true regarding a noncorrelated subquery? a) the subquery is known as a virtual table b) the subquery can run as a stand-alone query c) the outer query passes a value to the inner query before it can execute d) the subquery must be enclosed in brackets

b) the subquery can run as a stand-alone query A noncorrelated subquery can be extracted and run independently of the outer query.

When a macro is compiled, it is stored in which location by default? a) SASAUTOS b) work.sasmacr c) MAUTOSTORE d) sasuser.macros

b) work.sasmacr

Which statement correctly checks that the value of the macro variable Var is not in the following list: AU CA DE US? a) %if &var not in AU CA DE US; b) %if not &var in AU CA DE US; c) %if not (&var in AU CA DE US); d) %if &var is not in (AU CA DE US);

c) %if not (&var in AU CA DE US);

Which statement ensures that the Name parameter value is in uppercase? a) %let &Name=upcase(Name); b) %let &Name=upcase(&Name); c) %let Name=%upcase(&Name); d) %let Name=%upcase(Name);

c) %let Name=%upcase(&Name);

Which of the following %LET statements correctly assigns the value Director's Report to the macro variable Text? a) %let text=Director's Report; b) %let text=%str(Director's Report); c) %let text=%str(Director%'s Report); d) %let text=%nrstr(Director's Report);

c) %let text=%str(Director%'s Report);

You created a macro variable named MeanSalary and want to display the macro variable value in th elog. Which statement produces the value in the log? a) put &=MeanSalary; b) put MeanSalary; c) %put &=MeanSalary; d) %put MeanSalary;

c) %put &=MeanSalary; When you want to view the resolved value of a macro variable without having to include it in a report, you can use the %PUT statement to display the resolved macro variable value along with descriptive text in the SAS log.

Given the global symbol table shown here, what value does &&teach&crs resolve to? Name Value TEACH1 Hallis, George TEACH2 Wickham, Alice TEACH3 Forest, Debra CRS 3 a) &teach3 b) teach3 c) Forest, Debra d) none of the above

c) Forest, Debra

Which of the following describes the stages of program flow for a SAS program with no macro triggers? a) Compiler > Input Stack > Word Scanner b) Input Stack > Compiler > Word Scanner c) Input Stack > Word Scanner > Compiler d) Word Scanner > Compiler > Input Stack

c) Input Stack > Word Scanner > Compiler

Which of the following is true? a) A %MACRO statement must always be paired with a %END statement b) A macro definition can include macro variable references, but it cannot include SAS language statements c) Only macro language statements are checked for syntax errors when the macro is compiled d) The MPRINT system option writes a message to the log indicating whether a macro compiles successfully

c) Only macro language statements are checked for syntax errors when the macro is compiled

Which of the following SELECT statements would you use to produce a report that includes every column from the sashelp.cars table? a) SELECT ALL b) SELECT _COLUMNS_ c) SELECT* d) SELECT _ALL_

c) SELECT* The asterisk (*) represents all columns of the table or tables listed in the FROM clause.

Which of the following statements creates a new view named CustomerView from a query? a) create view CustomerView select ... b) create view as CustomerView select ... c) create view CustomerView as select... d) create view CustomerView; select ...

c) create view CustomerView as select... To create a view from a query result, you use a CREATE VIEW statement with the new view name and the AS keyword, followed by the query. Adding CREATE VIEW at the beginning of the query creates a view instead of results from the query.

Which method enables a view to be portable- that is, to function correctly if the underlying tables in the view are stored in different locations than the view? a) using a one-level name for the source table in the FROM clause in the view definition, and storing the view in a different location as the source table b) using a two-level name for the source table in the FROM clause in the view definition, and storing the view in the different location as the source table c) embedding the LIBNAME statement with a USING clause when creating the view

c) embedding the LIBNAME statement with a USING clause when creating the view Use the embedded LIBNAME statement in the USING clause to make the view definition portable. If you use a one-level name for the source table in a view definition, the view and the source table must reside in the same location.

Which set of statements creates a macro variable named region and assigns the value of the data set column Location? a) if location='Boston' then do; call symputx('region', 'Location'); end; b) if location='Boston' then do; %let region=Location; end; c) if location='Boston' then do; call symputx('region', Location); end;

c) if location='Boston' then do; call symputx('region', Location); end;

Which of the following queries produces a report of all columns from every table in the Sashelp library? a) select * from dictionaries.columns where libname = "SASHELP"; b) select * from sashelp.vcolumn where libname = "SASHELP"; c) select * from dictionary.columns where libname = "SASHELP";

c) select * from dictionary.columns where libname = "SASHELP"; The columns DICTIONARY table shows all columns in every table. The WHERE clause limits the report to all tables in the Sashelp library. All library values are stored in the uppercase. The SASHELP.VCOLUMN table produces the same report when using the PRINT procedure. SASHELP.VCOLUMN does not work in PROC SQL.

You want to count the number of employees in each department and return only the departments with more than 30 employees. Which query produces the correct report? a) select Department, count(*) as TotalEmployees from orion.employees where calculated TotalEmployees > 30 group by Department; b) select Department, count(*) as TotalEmployees from orion.employees having TotalEmployees > 30 group by department; c) select Department, count(*) as TotalEmployees from orion.employees group by Department having TotalEmployees > 30;

c) select Department, count(*) as TotalEmployees from orion.employees group by Department having TotalEmployees > 30; The WHERE clause is evaluated before a row is available for processing and determines which individual rows are available for grouping. You cannot use a WHERE clause to subset grouped rows by referring to the calculated summary column. You must use the HAVING clause with a GROUP BY clause to filter summarized rows. The HAVING clause affects groups in a way that is similar to how a WHERE clause affects individual rows. When you use a HAVING clause, PROC SQL displays only the groups that satisfy the HAVING expression. PROC SQL applies the HAVING condition after grouping the data and applying aggregate functions. THink of the HAVING clause as post-summarization filtering.

Which query finds the ID, Job_Title, and Salary values of all employees who make more than the average of all employees? a) select ID, Job_Title, Salary from staff where Salary > (mean(Salary)); b) select ID, Job_Title, Salary from staff where Salary > (select mean(Salary)); c) select ID, Job_Title, Salary from staff where Salary > (select mean(Salary) from staff);

c) select ID, Job_Title, Salary from staff where Salary > (select mean(Salary) from staff); A noncorrelated subquery must be a valid query inside parentheses in the WHERE or HAVING clause, and return a single column with one or more rows.

Which SELECT clause stores a list of products in a macro variable named InventoryList from the inventory table? Each product should be delimited by a comma. Inventory: Product Quantity Shirt 5 Shoes 3 Pants 2 a) select Product into :InventoryList "," from inventory; b) select PRodcut into :InventoryList delimited by "," from inventory; c) select Product into :InventoryList separated by "," from inventory;

c) select Product into :InventoryList separated by "," from inventory; Use the SEPARATED BY keywords to specify a character to delimit the values in the macro variable.

Which SQL query assigns the valus of the variable Course_Code to the macro variables Code1 through Code3 and the values of the data set variable Location to the macro variables Loc1 through Loc3? a) select course_code, location into: code1-code3, loc1-loc3 from schedule; b) select course_code into :code1-:code3, location into :loc1-:loc3 from schedule; c) select course_code, location into :code1-:code3, :loc1-:loc3 from schedule;

c) select course_code, location into :code1-:code3, :loc1-:loc3 from schedule;

Which syntax is appropriate for a self-join on the employees table? a) select e1.ID, e1.Name as EmpName, e2.Name as ManagerName from employees inner join employees on ID=ID; b) select e1.ID, e1.Name as EmpName, e2.Name as ManagerName from employees as e1 and employees as e2 on e1.ID = e2.ID; c) select e1.ID, e1.Name as EmpName, e2.Name as ManagerName from employees as e1 inner join employees as e2 on e1.ID = e2.ID;

c) select e1.ID, e1.Name as EmpName, e2.Name as ManagerName from employees as e1 inner join employees as e2 on e1.ID = e2.ID; To write a self-join, select from the same table listed twice with different aliases. Set up the join type and then the matching criteria referencing the table alias.

You want to store the descriptive statistics of the Price column from the inventory table into multiple macro variables. Which query successfully stores mean, median, min, and max? a) select mean(Price), median(Price), min(msrp), max(Price) into: MeanPrice, MedianPrice, MinPrice, MaxPrice from inventory; b) select mean(Price), median(Price), min(msrp), max(Price) into MeanPrice, MedianPrice, MinPrice, MaxPrice separated by "," from inventory; c) select mean(Price), median(Price), min(msrp), max(price) into :MeanPrice, :MedianPrice, :MinPrice, :MaxPrice from inventory;

c) select mean(Price), median(Price), min(msrp), max(price) into :MeanPrice, :MedianPrice, :MinPrice, :MaxPrice from inventory; The INTO clause creates multiple macro variables by specifying each macro variable name with a colon. Each macro variable is assigned the summarized value from the SELECT clause.

To produce a reprot that includes all Toyotas with a Price value less than $30,000, which WHERE clause would you use? a) where Make = "Toyota" and Price < $30,000 b) where Make = "Toyota" or Price < 30000 c) where Make = "Toyota" and Price < 30000 d) where Make = "Toyota" or Price < $30,000

c) where Make = "Toyota" and Price < 30000 To select all rows where Make equals Toyota and Price is less than 30000, you must use the AND operator. Toyota must be in quotation marks and is case sensitive, and the numeric Price value must be in standard numeric form.

Which IF statement subsets ProductName for values containing the standalone word shirt? a) if find(ProductName, 'Shirt') >0; b) if findw (ProductName, 'Shirt') = 0; c) if find(ProductName, ' Shirt ') = 0; d) if findw(ProductName, 'Shirt', ' ') >0;

d Choice A returns four rows (rows 2, 3, 4, and 5). Choice B returns one row (row 1). Choice c returns four rows (rows 1, 3, 4, 5) Choice D returns one row (row 2).

Which syntax correctly defines a hash object with one key component and two data components? a) Tests.definekey(Name); Tests.definedata(Test4 Final); b) Tests.definekey(Name); Tests.definedata(Test4, Final); c) Tests.definekey('Name'); Tests.definedata('Test4' 'Final'); d) Tests.definekey('Name'); Tests.definedata('Test4', 'Final');

d components must be specified in quotation marks; multiple components must be separated by commas

Which of the following correctly converts the value of the macro variable Last_Name to proper case? a) %let last_name = %propcase(last_name); b) %let last_name = %propcase(&last_name); c) %let last_name = %sysfunc(propcase(last_name)); d) %let last_name = %sysfunc(propcase(&last_name));

d) %let last_name = %sysfunc(propcase(&last_name));

Which statement creates a macro variable named Location that has the value storage? a) &let location=storage; b) let &location=storage; c) %let location="storage"; d) %let location=storage;

d) %let location=storage;

Which expression in a macro %DO loop writes the following messages to the log? City1 is London City2 is Tokyo City3 is Buenos Aires City4 is Toronto a) %put City&i is &Cityi; b) %put City&i is &City&i; c) %put City&i is &City&&i; d) %put City&i is &&City&i;

d) %put City&i is &&City&i;

How many rows does the following query produce in the report? select * from sq.employee_donations, sq.employees; employee_donations: Employee_ID, Qtr1, Qtr2, Qtr3, Qtr4 (4 rows) employees: Employee_ID, Name (5 rows) a) 4 b) 5 c) 9 d) 20

d) 20 The default join combines every row in each table. This is called the Cartesian product. Typically, the Cartesian product is not the desired result. In this example, all 4 rows from the employee_donations table are joined with every row in the employees table. The new report contains 20 rows.

You want to explore the first 10 rows of the sq.profit table. Which PROC SQL option limits the rows from the sq.profit table that contribute to the query? a) OUTOBS=10 b) OBS=10 c) ROW=10 d) INOBS=10

d) INOBS=10 The INOBS= option restricts the number of rows that PROC SQL reads from all tables specified in the FROM clause. The OUTOBS= option restricts the number of rows that a query outputs. The OBS= option is a SAS data set option that is used in the FROM clause to limit the number of rows from a table.

When using only the SQL procedure, you can create which of the following objects? a) SAS tables b) SAS views c) DBMS tables d) all of the above

d) all of the above As output, a PROC SQL query creates a report by default. However, a PROC SQL query can also create SAS tables, SAS or DBMS views, and DBMS tables.

Which of the following is not a benefit of using the SAS macro facility? a) the macro facility enables you to reduce the amount of text that you must enter in your programs b) the macro facility enables you to write programs that are easily modified and customized c) the macro facility enables you to easily and automatically reference system information in your programs d) code that is generated using macro techniques compiles and executes faster than other SAS code

d) code that is generated using macro techniques compiles and executes faster than other SAS code

You want to display the column name, column types, and other column information from the sq.profit table. Which statement should you use? a) content sq.profit; b) contents table sq.profit; c) describe sq.profit; d) describe table sq.profit;

d) describe table sq.profit; You specify the DESCRIBE TABLE statement and then the name of the table to describe. DESCRIBE TABLE generates a description of the table in the log. Results display the column names, column types, and associated labels or formats, if they exist, for specific columns.

Which statement concerning macro parameters is false? a) parameter names and values are inside parentheses and are comma delimited b) the order of positional parameter names in a macro definition must match the order of parameter values in a macro call c) keyword parameters are assigned a default value after an equal sign d) keyword parameters must be listed before positional parameters in a mixed parameter list

d) keyword parameters must be listed before positional parameters in a mixed parameter list

Which %IF expression is true if the Input parameter value is A? %macro report(input); ... %mend report; %report(A) a) %if &input=A or B %then %do; b) %if &input in A B %then %do; c) %if &input in('A', 'B') %then %do; d) none of the above

d) none of the above


Set pelajaran terkait

Trigonometry and Triangles review

View Set

Public Speaking Exam #2 Study Guide

View Set

LC30: LearningCurve - Ch. 30: Monetary Policy

View Set

BUS 22: Chapter 1: Test Your Knowledge

View Set

EXAM 4 MasteringBiology Chapter 32 Fungus

View Set