Isma1

Descripción

Isma1
Ismael Civicos
Test por Ismael Civicos, actualizado hace más de 1 año
Ismael Civicos
Creado por Ismael Civicos hace casi 6 años
337
0

Resumen del Recurso

Pregunta 1

Pregunta
Which of the following statements correctly describes a delimited raw data file? Select all that apply.
Respuesta
  • It is external to SAS.
  • It is not software-specific.
  • The values are arranged in columns.
  • The values are separated by spaces or other characters.
  • The values are labeled with field names.

Pregunta 2

Pregunta
Suppose you want to write a DATA step that reads a raw data file. Do you need to use a LIBNAME statement to assign a libref to the directory in which the raw data file is stored?
Respuesta
  • yes
  • no

Pregunta 3

Pregunta
Which of the following statements is true?
Respuesta
  • a. SAS creates an input buffer only if reading data from a raw data file.
  • At compile time, the PDV holds the variable name, type, length, and initial value.
  • The descriptor portion of the data set is the first item that SAS creates during the compilation phase

Pregunta 4

Pregunta
Which statement is true of a DATA step when reading from a raw data file?
Respuesta
  • a. SAS reads data from the raw data file into the PDV.
  • The size of the input buffer adjusts automatically based on the length of the input record.
  • At the bottom of the DATA step, SAS writes the contents of the PDV to the output SAS data set.

Pregunta 5

Pregunta
Which of the LENGTH statements below creates the character variable SalesRep with a length of 18?
Respuesta
  • length $ SalesRep 18;
  • length SalesRep 18;
  • length SalesRep $ 18;
  • length SalesRep=18;

Pregunta 6

Pregunta
Which of the DATA steps below creates the variable SalesRep with a length of 18?
Respuesta
  • data work.mydata; infile 'filepath/sales.csv'; length SalesRep $ 18; input Amount SalesRep $ Customer $; run;
  • data work.mydata; infile 'filepath/sales.csv' input Amount SalesRep $ Customer $; length SalesRep $ 18; run;

Pregunta 7

Pregunta
Which of these statements is not true about a SAS informat?
Respuesta
  • A SAS informat provides instructions for reading nonstandard values.
  • A SAS informat provides a length for character variables.
  • A SAS informat must include a period.
  • A SAS informat controls the way nonstandard data values are stored in a SAS data set.
  • A SAS informat must include a numeric value to specify the width of the input field.

Pregunta 8

Pregunta
Which of the following DATA steps correctly reads instream data as input for the data set?
Respuesta
  • data work.mydata; input Amount SalesRep $ Customer $; datalines; 250.35 Phelps Torres 178.50 Deng Horekova ;
  • data work.mydata; datalines; 250.35 Phelps Torres 178.50 Deng Horekova input Amount SalesRep $ Customer $; ;

Pregunta 9

Pregunta
What does SAS do when it encounters a data error in a raw data record? Select all that apply.
Respuesta
  • prints a ruler and the raw data record in the SAS log
  • stops processing the program
  • assigns a missing value to the variable that the invalid data affects
  • prints a note about the error in the SAS log
  • rints the variable values in the corresponding SAS observation in the SAS log

Pregunta 10

Pregunta
By default, SAS creates character variables with a length of _____ bytes for list input.
Respuesta
  • a. 6
  • b. 8
  • c.10
  • d.12

Pregunta 11

Pregunta
Which of the following values can SAS store, without truncation, in a character variable that has a length of 8 bytes?
Respuesta
  • Sales Manager
  • Regional Manager
  • 12036578
  • $123,293.50
  • 06/15/2008

Pregunta 12

Pregunta
To explicitly define the length of a variable read from a raw data file, you use a LENGTH statement after the INPUT statement in a DATA step.
Respuesta
  • True
  • False

Pregunta 13

Pregunta
Which of the following statements specifies instream data, or the lines of data that you enter directly in a DATA step?
Respuesta
  • DATALINES
  • INFILE
  • INPUT
  • INSTREAM

Pregunta 14

Pregunta
Which of the following statements cannot be used in a DATA step that reads a raw data file as input?
Respuesta
  • a. KEEP
  • b. IF
  • c. FORMAT
  • d. WHERE

Pregunta 15

Pregunta
Which of the following can determine the length of a new variable?
Respuesta
  • the length of the variable's first value
  • the assignment statement
  • the LENGTH statement
  • all of the above

Pregunta 16

Pregunta
Which of the following SAS functions returns a number from 1 to 12?
Respuesta
  • YEAR(SAS-date)
  • MONTH(SAS-date)
  • WEEKDAY(SAS-date)
  • TODAY(SAS-date)

Pregunta 17

Pregunta
An ELSE statement must immediately follow the IF-THEN statement in your program, and it executes only if the previous IF-THEN statement is true.
Respuesta
  • True
  • False

Pregunta 18

Pregunta
Which DATA step ensures that all observations are assigned a nonmissing value for Bonus?
Respuesta
  • data work.bonus; set orion.sales; if Country='US' then Bonus=500; else if Country='AU' then Bonus=300; run;
  • data work.bonus; set orion.sales; if Country='US' then Bonus=500; else Bonus=300; run;

Pregunta 19

Pregunta
Which of the following statements assigns the value pass to the variable Grade when the variable Points is greater than or equal to 70?
Respuesta
  • if Points=70 then Grade='pass';
  • if Grade>=70 then Points='pass';
  • if Points>=70 then Grade=pass;
  • if Points>=70 then Grade='pass';

Pregunta 20

Pregunta
Use a DO group in a DATA step when you want to execute multiple statements for a true IF-THEN expression.
Respuesta
  • True
  • False

Pregunta 21

Pregunta
Which SET statement has correct syntax?
Respuesta
  • set empscn(rename(Country=Location)) empsjp(rename(Region=Location));
  • set empscn(rename=(Country=Location)) empsjp(rename=(Region=Location));
  • set empscn rename=(Country=Location) empsjp rename=(Region=Location);

Pregunta 22

Pregunta
Which of the following statements is true about merging SAS data sets by using the DATA step?
Respuesta
  • Merging combines observations from two or more data sets into a single observation in a new data set.
  • SAS can merge data sets based on the position of observations in the original data set or by the values of one or more common variables.
  • Match-merging is merging by values of one or more common variables.
  • To match-merge data sets, all input data sets must be sorted or indexed on the BY variables.
  • All of the above

Pregunta 23

Pregunta
Which of the following programs concatenates the data sets, sales and products, in that order?
Respuesta
  • data newsales; set products sales; run;
  • data newsales; set sales products; run;
  • data newsales; set sales; set products; run;

Pregunta 24

Pregunta
If you run this DATA step, what observations does the data set bonuses contain? data bonuses; merge managers staff; by EmpID; run;
Respuesta
  • all of the observations from managers, and only those observations from staff with matching values for EmpID
  • all of the observations from staff, and only those observations from managers with matching values for EmpID
  • all observations from staff and all observations from managers, whether or not they have matching values
  • only those observations from staff and manager with matching values for EmpID

Pregunta 25

Pregunta
What is the syntax error in this DATA step? data returns_qtr1; set returns_jan(rename=(ID=CustID) (Return=Item)) returns_feb(rename=(Dt=Date)) returns_mar; run;
Respuesta
  • You cannot specify more than two data sets in the SET statement.
  • There are too many sets of parentheses in the RENAME= option.
  • You cannot specify multiple variables in the RENAME= option.
  • The BY statement is missing.

Pregunta 26

Pregunta
If you run this DATA step, what observations does the data set bonuses contain? data bonuses; merge managers (in=M) staff (in=S); by EmpID; if M=0 and S=1; run;
Respuesta
  • only the observations from staff that have no match in managers
  • only the observations from managers that have no match in staff
  • all observations from both managers and staff, whether or not they match
  • no observations

Pregunta 27

Pregunta
What change was needed in the TABLES statement? proc freq data=orion.sales; tables Country nocum nopercent; run;
Respuesta
  • comma between NOCUM and NOPERCENT
  • forward slash before the TABLES statement options
  • an equals sign after the TABLES statement variable
  • none of the above

Pregunta 28

Pregunta
PROC UNIVARIATE identified two observations with Salary values less than 24000. What procedure can you use to display the observations containing the invalid values?
Respuesta
  • PROC MEANS
  • PROC PRINT
  • PROC FREQ

Pregunta 29

Pregunta
Which of these procedures produces output that is most useful for detecting duplicate values?
Respuesta
  • PROC PRINT
  • PROC FREQ
  • PROC MEANS
  • PROC UNIVARIATE

Pregunta 30

Pregunta
Which of these programs is most useful for determining the exact observation that contains a numeric variable with an extreme value?
Respuesta
  • proc print data=sales.totals; var ProdNum Sales Region; run;
  • proc freq data=sales.totals; tables ProdNum Sales Region; run;
  • proc univariate data=sales.totals; run;

Pregunta 31

Pregunta
A PROC FREQ analysis identified invalid and missing values in a data set. Which of these procedures can display the observations that contain invalid or missing values?
Respuesta
  • PROC PRINT
  • PROC FREQ
  • PROC MEANS
  • PROC UNIVARIATE

Pregunta 32

Pregunta
This PROC MEANS step creates all of the statistics listed below. proc means data=orion.sales; run; minimum and maximum the total number of observations that PROC MEANS processes for each subgroup (N Obs) mean and standard deviation the number of nonmissing values (N)
Respuesta
  • True
  • False

Pregunta 33

Pregunta
Which option enables you to specify the number of extreme observations displayed by PROC UNIVARIATE?
Respuesta
  • a. NEXTROBS=
  • b. NLEVELS
  • c. NOPRINT
  • _ALL_

Pregunta 34

Pregunta
In a PROC FREQ step, you can use user-defined formats, as well as existing SAS formats, to group data.
Respuesta
  • True
  • False

Pregunta 35

Pregunta
Is there a problem with this program? ods pdf file="filepath/myreport.pdf"; proc print data=orion.sales; run; ods close;
Respuesta
  • True
  • False

Pregunta 36

Pregunta
Which program correctly opens and closes the LISTING destination?
Respuesta
  • ods; proc freq data=orion.staff; tables Manager_ID; run; ods close;
  • ods listing; proc freq data=orion.staff; tables Manager_ID; run; ods listing close;
  • ods destination; proc freq data=orion.staff; tables Manager_ID; run; ods destination close;

Pregunta 37

Pregunta
The SAS data set orion.growth contains 6 observations and 3 variables (Department, Total_Employees, and Increase). How many observations and variables will the forecast data set contain? data forecast; set orion.growth; TotalYear1=Total_Employees*(1+Increase); run;
Respuesta
  • 6 observations, 4 variables
  • 6 observations, 3 variables
  • 12 observations, 4 variables

Pregunta 38

Pregunta
If you submit the code shown here, what happens if the value of Country is canada? data northamerica asia check; set salesdata; select(Country); when ("US","CANADA","MEXICO") output northamerica; when ("JAPAN") output asia; otherwise output; end; run;
Respuesta
  • Nothing happens because the value does not match any value listed in a WHEN expression.
  • The observation is written only to the check data set.
  • The observation is written to all three output data sets

Pregunta 39

Pregunta
Which of the following programs correctly assigns values of Bonus based on values of Promotion?
Respuesta
  • select; when (2) Bonus=Salary*.6; end;
  • select (Promotion); when (Promotion=2) Bonus=Salary*.6; end;
  • select (Promotion); when (2) Bonus=Salary*.6; end;

Pregunta 40

Pregunta
The data set employee_addresses has 9 variables. After this code runs, how many variables will there be in the usa data set? data usa(keep=Employee_Name City State) australia other; set orion.employee_addresses; if Country='US' then output usa; else if Country='AU' then output australia; else output other; run;
Respuesta
  • a. 6
  • b. 3
  • c. 9

Pregunta 41

Pregunta
The SAS data set car has the variables CarID, CarType, Miles, and Gallons. Select the DATA step or steps that creates the ratings data set with the variables CarType and MPG. Select all that apply.
Respuesta
  • data ratings(keep=CarType MPG); set car(drop=CarID); MPG=Miles/Gallons; run;
  • data ratings; set car(drop=CarID); drop Miles Gallons; MPG=Miles/Gallons; run;

Pregunta 42

Pregunta
Which program reads data from observation 100 to observation 200 and prints 50 observations?
Respuesta
  • data new(firstobs=100 obs=200); set old; run; proc print data=new(obs=50); run;
  • data new; set old(firstobs=100 obs=200); run; proc print data=new(obs=50); run;

Pregunta 43

Pregunta
Which DATA step creates Mth2Dte as an accumulating variable with an initial value of 50?
Respuesta
  • data mnthtot; set orion.aprsales; retain SaleAmt 50; Mth2Dte=Mth2Dte+SaleAmt; run;
  • data mnthtot; set orion.aprsales; retain Mth2Dte 50; Mth2Dte=Mth2Dte+SaleAmt; run;

Pregunta 44

Pregunta
What must happen in the DATA step to summarize data by groups? Select all that apply.
Respuesta
  • Sort the input data.
  • Set the accumulating variable to its initial value at the start of each BY group.
  • Increment the accumulating variable.
  • Output only the last observation of each BY group.

Pregunta 45

Pregunta
Which DATA step creates Mth2Dte as an accumulating variable with an initial value of 0?
Respuesta
  • data mnthtot; set orion.aprsales; retain Mnth2Date; Mth2Dte=Mth2Dte+SaleAmt; run;
  • data mnthtot; set orion.aprsales; retain Mth2Dte 0; Mth2Dte=Mth2Dte+SaleAmt; run;

Pregunta 46

Pregunta
Which statement retains the value of Sales2Dte in the PDV across iterations of the DATA step?
Respuesta
  • Total_Retail_Price+Sales2Dte;
  • Sales2Dte+Total_Retail_Price;
  • Sales2Dte=Sales2Dte+Total_Retail_Price;

Pregunta 47

Pregunta
Is this statement true? To create an accumulating total for a group, you first have to sort the data by the grouping variable(s)
Respuesta
  • yes
  • no

Pregunta 48

Pregunta
Which statement is true about the following program? data payroll.empmast; set payroll.employee; by gender jobcode; run;
Respuesta
  • A change in the value of LAST.JobCode causes the value of LAST.Gender to change.
  • A change in the value of LAST.Gender causes the value of LAST.JobCode to be set to 1.
  • Both LAST.JobCode and LAST.Gender are stored in the new data set.

Pregunta 49

Pregunta
Which statement is false about BY-group processing when you use the BY statement with the SET statement?
Respuesta
  • The data sets listed in the SET statement must be indexed or sorted by the values of the BY variable(s).
  • The DATA step automatically creates two new variables, FIRST. and LAST., for each variable in the BY statement
  • The FIRST. and LAST. variables identify the first and last observation in each BY group, respectively.
  • The FIRST. and LAST. variables have values of 0 when SAS is processing an observation with the first occurrence of a new value for those variables, and a value of 1 for the other observations.

Pregunta 50

Pregunta
If you process a BY group that consists of a single observation, what are the correct values of FIRST.BY-variable and LAST.BY-variable?
Respuesta
  • FIRST.BY-variable=0 LAST.BY-variable=0
  • FIRST.BY-variable=1 LAST.BY-variable=0
  • FIRST.BY-variable=1 LAST.BY-variable=1
  • FIRST.BY-variable=0 LAST.BY-variable=1

Pregunta 51

Pregunta
When using the DATA step to summarize grouped data, what is the first step in the process?
Respuesta
  • Output the first observation of each BY group.
  • Set the accumulating variable to zero at the start of each BY group.
  • Increment the accumulating variable with a sum statement (automatically retains).

Pregunta 52

Pregunta
Which DATA step statement indicates to continue processing the last observation of a BY group?
Respuesta
  • if first.jobtype;
  • if last.jobtype;
  • if first.jobtype then output;
  • if last.jobtype then output=1;

Pregunta 53

Pregunta
Which raw data value below is an example of nonstandard numeric data?
Respuesta
  • 234.908
  • -234.908
  • $234,908.00
  • 23E4

Pregunta 54

Pregunta
Can you use column input to read both standard and nonstandard data in fixed fields?
Respuesta
  • Yes
  • No

Pregunta 55

Pregunta
Which informat below should you use to read the raw data value $1,230,456 as a numeric variable?
Respuesta
  • w.
  • . $w.
  • COMMAw.

Pregunta 56

Pregunta
Which set of instructions reads the values for Quantity (in the third field) after the values for Item (in the first field)? Select all that apply.
Respuesta
  • input Item $9. @20 Quantity 3.;
  • input Item $9. +10 Quantity 3.;
  • input Item $9. +11 Quantity 3.;

Pregunta 57

Pregunta
Which INPUT statement correctly reads the values for Fname, Lname, Address, City, State, and Zip in order?
Respuesta
  • input Fname $ Lname $ / Address $20. / City $ State $ Zip $;
  • input Fname $ Lname $ /; Address $20. /; City $ State $ Zip $;
  • input / Fname $ Lname $ / Address $20. City $ State $ Zip $;

Pregunta 58

Pregunta
Which style of INPUT statement specification is used to read data in fixed columns?
Respuesta
  • column input
  • formatted input
  • a and b
  • none of the above

Pregunta 59

Pregunta
In the INPUT statement, what is the syntax used to move the input pointer to a specified column?
Respuesta
  • a. /n
  • b. +n
  • c. #n
  • d. @n

Pregunta 60

Pregunta
The width of the input field can be specified by an informat when used with formatted input.
Respuesta
  • True
  • False

Pregunta 61

Pregunta
Formatted input cannot be used to read which of the following types of raw data?
Respuesta
  • . standard free-format data
  • standard data in fixed fields
  • nonstandard data in fixed fields

Pregunta 62

Pregunta
Which set of instructions does not correctly read the values for Quantity (in the third field) after the values for Item (in the first field)?
Respuesta
  • input Item $9. @20 Quantity 3.;
  • input Item $9. +10 Quantity 3.;
  • . input Item $9. +11 Quantity 3.;

Pregunta 63

Pregunta
Which of the following INPUT statements correctly reads the values for Fname (in the second field), Lname, Department, and Salary (in that order)?
Respuesta
  • input @14 Fname $10. @1 Lname $10./ Department $7./ Salary comma10.;
  • input @14 Fname $10. @1 Lname $10. #2 Department $7. #3 Salary comma10.;
  • both a and b

Pregunta 64

Pregunta
The single trailing @ releases a record when which of the following conditions occurs?
Respuesta
  • An INPUT statement without a trailing @ executes.
  • The next iteration of the DATA step begins.
  • both a and b

Pregunta 65

Pregunta
What does a forward slash (/) indicate when used in an INPUT statement?
Respuesta
  • Load the next file in the input buffer.
  • Load the next field in the input buffer.
  • Load the next record in the input buffer.
  • none of the above

Pregunta 66

Pregunta
When you use a trailing @, which of the following things occur?
Respuesta
  • The pointer position does not change.
  • No new record is loaded into the input buffer.
  • The next INPUT statement for the same iteration of the DATA step continues to read the same record.
  • All of the above

Pregunta 67

Pregunta
Generally, the most efficient place to put a subsetting IF statement is as early as possible in the DATA step
Respuesta
  • True
  • False

Pregunta 68

Pregunta
Which of the following statements is false?
Respuesta
  • Functions are used in SAS statements.
  • A function is written by specifying the function name followed by the function arguments.
  • . Function arguments must be enclosed in parentheses.
  • All function arguments are variables.

Pregunta 69

Pregunta
Which assignment statement converts the current value of Name to the new value of Name? Select all that apply
Respuesta
  • . propcase(Name,'*');
  • propcase(Name,' *');
  • propcase(Name,'* ');

Pregunta 70

Pregunta
If you specify the period, comma, and blank as delimiters for the SCAN function, what is the fourth word in the text string below? MR. JONATHAN E. MATTHEWS, PERSONNEL DIRECTOR
Respuesta
  • E
  • PERSONNEL DIRECTOR
  • MATTHEWS
  • PERSONNEL

Pregunta 71

Pregunta
If you specify the colon as the delimiter for the SCAN function, how many words appear in the text string below? Washington:New York:California:New Mexico
Respuesta
  • . 4
  • 6

Pregunta 72

Pregunta
In this DATA step, which SCAN function completes the assignment statement to correctly extract the four-digit year from the Text variable? Select all that apply. data Scan_Quiz; Text="New Year's Day, January 1st, 2007"; Year=________________________; run;
Respuesta
  • scan(Text,-1)
  • scan(Text,6)
  • scan(Text,6,', ')

Pregunta 73

Pregunta
Which of the following FIND functions returns the value 1?
Respuesta
  • find('She sells seashells? Yes, she does.','she')
  • find('She sells seashells? Yes, she does.','she','i')
  • find('She sells seashells? Yes, she does.','she',22)
  • find('She sells seashells? Yes, she does.','she',-10)

Pregunta 74

Pregunta
Select the statement that replaces the first three characters in values of Dept with the characters PUR.
Respuesta
  • Dept=substr(PUR,1,3);
  • substr(Dept,1,3)='PUR';
  • PUR=substr(Dept,1,3);
  • none of these

Pregunta 75

Pregunta
Select the assignment statement that changes the string Burma to Myanmar in values of the variable Country. Assume that Country has a length of 25 bytes.
Respuesta
  • Country=tranwrd('Burma','Myanmar');
  • Country=tranwrd(Country,Burma,Myanmar);
  • Country=tranwrd(Country,'Burma','Myanmar');

Pregunta 76

Pregunta
Which of the following assignment statements correctly calculates the average of Rest1, Rest2, Rest3, and Rest4?
Respuesta
  • RestAvg=mean of Rest1-Rest4;
  • RestAvg=mean(Rest1 Rest2 Rest3 Rest4);
  • RestAvg=sum(Rest1,Rest2,Rest3,Rest4);
  • RestAvg=mean(Rest1,Rest2,Rest3,Rest4);

Pregunta 77

Pregunta
Which program changes the values of the variable Examples, found in the data set Before, to the values shown in After?
Respuesta
  • data after; set before; Examples=int(Examples); run;
  • data after; set before; Examples=round(Examples); run;
  • both a and b

Pregunta 78

Pregunta
Which statement correctly describes the result of submitting the DATA step that is shown below? The variables TotalPay and Commission are numeric. The variable Pay is character. data reg.newsales; set reg.sales; TotalPay=Pay+Commission; run;
Respuesta
  • The values of the numeric variables TotalPay and Commission are converted to character values because these variables are used in a character context.
  • The values of the character variable Pay are converted to numeric values because this variable is used in a numeric context.

Pregunta 79

Pregunta
A typical value for the character variable Target is 123,456. Which statement correctly converts the values of Target to numeric values when creating the variable TargetNo?
Respuesta
  • TargetNo=input(Target,comma6.);
  • TargetNo=input(Target,comma7.);
  • TargetNo=put(Target,comma6.);
  • TargetNo=put(Target,comma7.);

Pregunta 80

Pregunta
Which function calculates the average of the variables Var1, Var2, Var3, and Var4?
Respuesta
  • a. mean(Var1,Var4)
  • b. mean(Var1-Var4)
  • c. mean(of Var1,Var4)
  • d. mean(of Var1-Var4)

Pregunta 81

Pregunta
Which assignment statement for Total correctly uses a SAS variable list and the SUM function to add the values for Year1, Year2, Year3, and Year4?
Respuesta
  • a. Total=sum(of Year1-Year4);
  • b. Total=sum(of Year2--Year4);
  • c. Total=sum(of Year:);
  • d. All of the above

Pregunta 82

Pregunta
Which function returns the greatest integer less than or equal to the argument?
Respuesta
  • a. CEIL
  • b. INT
  • c. FLOOR

Pregunta 83

Pregunta
Which value is returned from the following statement? x=int(7.89)
Respuesta
  • a. 7
  • b. 7.8
  • c. 8

Pregunta 84

Pregunta
If the value of PctDec is -3.272, which statement will NOT return a value of -3 for Decrease?
Respuesta
  • Decrease=round(PctDec,1);
  • Decrease=ceil(PctDec);
  • Decrease=floor(PctDec);
  • Decrease=int(PctDec);

Pregunta 85

Pregunta
Within the data set hrd.temp, PayRate is a character variable and Hours is a numeric variable. What happens when the following program is submitted? data temp; set hrd.temp; Salary=PayRate*Hours; run;
Respuesta
  • SAS converts the values of PayRate to numeric values. No message is written to the log.
  • SAS converts the values of PayRate to numeric values. A message is written to the log.
  • SAS converts the values of Hours to character values. A message is written to the log.

Pregunta 86

Pregunta
Which of the following functions can convert the values of the numeric variable Level to character values?
Respuesta
  • put(Level,3.)
  • input(3.,Level)
  • put(3.,Level)
  • input(Level,3.)

Pregunta 87

Pregunta
A typical value for the numeric variable SiteNum is 12.3. Which statement correctly converts the values of SiteNum to character values when creating the variable Location?
Respuesta
  • Location=Dept||'/'||put(SiteNum, $3);
  • Location=Dept||'/'||put(SiteNum,4);
  • Location=Dept||'/'||put(SiteNum,3.1);
  • Location=Dept||'/'||put(SiteNum,4.1);

Pregunta 88

Pregunta
Which of the following functions converts the character values of Base to numeric values?
Respuesta
  • put(comma10.2,Base)
  • put(Base,comma10.2)
  • input(Base,comma10.2)
  • input(comma10.2, Base)

Pregunta 89

Pregunta
AvgSale=input(AvgSale,comma6.);
Respuesta
  • yes
  • no

Pregunta 90

Pregunta
Which of the following represents acceptable syntax for the PUTLOG statement. Select all that apply.
Respuesta
  • putlog 'customer'=;
  • putlog 'Note: write this in the log';
  • putlog write this in the log;
  • putlog customer $quote13.;
  • putlog customer=;

Pregunta 91

Pregunta
What will this PUTLOG statement do?
Respuesta
  • write text to the log
  • write the values of all the variables to the log
  • write formatted values to the log
  • write all the logic errors to the log

Pregunta 92

Pregunta
Which of the following represents acceptable syntax for the END= option in the INFILE statement?
Respuesta
  • infile work.catalog end=last;
  • infile work.catalog end.last;
  • infile catalog end=last;
  • infile catalog end.last;

Pregunta 93

Pregunta
Is it acceptable to use the END= option in both SET and INFILE statements?
Respuesta
  • yes
  • no

Pregunta 94

Pregunta
When a logic error occurs, SAS writes an error message to the log.
Respuesta
  • True
  • False

Pregunta 95

Pregunta
Which of the following is not a task of the PUTLOG statement?
Respuesta
  • Write text to the log.
  • Write formatted values to the log.
  • Write all the logic errors to the log.
  • Write the values of all the variables to the log.

Pregunta 96

Pregunta
The variable Title is 22 characters long. One of the values for Title is My House on the Lane. Which of the following statements would provide the full value of the variable in the log if the data included two leading spaces?
Respuesta
  • putlog Title $quote20.;
  • putlog Title $quote22.;
  • putlog Title $quote30.;

Pregunta 97

Pregunta
The END= option in the SET or INFILE statement indicates that SAS should process the last observation.
Respuesta
  • True
  • False

Pregunta 98

Pregunta
When you submit the following program, what will be listed in the log? data work.holdings; set work.catalog end=last; if _n_=1 then putlog 'books'; if last then do; putlog 'last of books'; putlog _all_; end; run;
Respuesta
  • Books, last of books, and the values of all the variables for the last observation
  • Books, last of books, and the values for all the variables in all observations
  • The values of all the variables for the last observation

Pregunta 99

Pregunta
Select the DO WHILE statement that would generate the same result as the program below. data work.invest; Capital=100000; do until(Capital gt 500000); Year+1; Capital+(Capital*.10); end; run;
Respuesta
  • do while(Capital ge 500000);
  • do while(Capital=500000);
  • do while(Capital le 500000);
  • do while(Capital>500000);

Pregunta 100

Pregunta
How many times does this DO loop execute? data work.test; x=15; do while(x<12); x+1; end; run;
Respuesta
  • 0
  • 1
  • 12
  • x

Pregunta 101

Pregunta
What is the value of X at the completion of the DATA step? data work.test; x=15; do while(x<12); x+1; end; run;
Respuesta
  • 12
  • 15
  • 16
  • unknkown

Pregunta 102

Pregunta
In the example below, the variable X is summed during each iteration of the DO loop. What is the value of X at the completion of this DATA step? data test; do i=1 to 5; do j=1 to 4; x+1; end; end; run;
Respuesta
  • 0
  • 5
  • 20
  • 21

Pregunta 103

Pregunta
Which statement is false regarding nested DO loops?
Respuesta
  • Each DO statement must have a corresponding END statement.
  • Each DO loop must have its own index variable.
  • Each DO loop must use the same increment value.
  • Each DO loop can contain iterated SAS statements.

Pregunta 104

Pregunta
During each execution of the following DO loop, the value of Earned is calculated and is added to its previous value. How many times does this DO loop execute? data finance.earnings; Amount=1000; Rate=.075/12; do Month=1 to 12; Earned+(Amount+Earned)*Rate; end; run;
Respuesta
  • 0
  • 1
  • 12
  • 13

Pregunta 105

Pregunta
In the data set invest, what would be the stored value for Year? data invest; do Year=2008 to 2012; Capital+5000; Capital+(Capital*.03); end; run;
Respuesta
  • . missing
  • 2008
  • 2012
  • 2013

Pregunta 106

Pregunta
What is the value of X at the completion of the DATA step? data test; x=15; do while(x>12); x+1; end; run;
Respuesta
  • 12
  • 15
  • 16
  • This loop executes infinitely

Pregunta 107

Pregunta
In the following DATA step, how many times does the inner DO loop execute? data invest; do Year=2008 to 2012; Capital+5000; do Quarter=1 to 4; Capital+(Capital*.03); end; end; run;
Respuesta
  • 4
  • 8
  • 16
  • 20

Pregunta 108

Pregunta
Based on this DATA step, how many observations will the earnings data set contain? data earnings; Earned=0; do Count=1 to 12; Earned+(Amount+Earned)*(Rate/12); output; end; run;
Respuesta
  • 0
  • 1
  • 12
  • 13

Pregunta 109

Pregunta
Which of the following statements will not execute a DO loop?
Respuesta
  • do i=8, 10, 4, 14;
  • do i=.30 to .20 by -.1;
  • do i=(x+10) to x;
  • do i=-1 to -3 by -1;

Pregunta 110

Pregunta
How many times does the DO loop execute for the first iteration of the DATA step?
Respuesta
  • 1
  • 5
  • 3
  • 4

Pregunta 111

Pregunta
How many times does this DO loop execute? data test; x=15; do until(x>12); x+1; end; run;
Respuesta
  • 0
  • 1
  • 12
  • unknown

Pregunta 112

Pregunta
What is the value of X at the completion of the DATA step? data test; x=15; do until(x>12); x+1; end; run;
Respuesta
  • 12
  • 15
  • 16
  • unknown

Pregunta 113

Pregunta
Which statement about SAS arrays is true?
Respuesta
  • When you create an array in one DATA step, you can reference it by name in another DATA step.
  • An array can contain a mixture of numeric and character variables if they are explicitly named.
  • An array exists only for the duration of the DATA step.
  • It is a good practice to name the array the same name as one of the variables in the array

Pregunta 114

Pregunta
Which of the following ARRAY statements is correct?
Respuesta
  • array{*} Ans1-Ans10;
  • array quiz{6} Q1 Q2 Q3 Q4 Q5 Q6 Q7;
  • array fruit{*} Apples Pears Grapes Bananas Oranges;
  • quiz array{7} Q1-Q6;

Pregunta 115

Pregunta
The trial data set contains five numeric variables that store data collected during an experimental trial. Which ARRAY statement groups the variables T1, T2, T3, T4, and T5 into an array named test?
Respuesta
  • array test{*} T1 T2 T3 T4 T5;
  • array test{5} T1-T5;
  • array test{*} _numeric_;
  • all of the above

Pregunta 116

Pregunta
Which DO loop completes the program so that the values stored in the variables Weight1-Weight8 are converted from kilograms to pounds? data hrd.convert; set hrd.fitclass; array wt{*} Weight1-Weight8; ___________ __________ ___________ run;
Respuesta
  • do i=1 to 8; wt{i}=wt{i}*2.2046; end;
  • do i=1 to *; wt[i]=wt[i]*2.2046; end;
  • do i=1 to 8; Weight{i}=Weight{i}*2.2046; end;

Pregunta 117

Pregunta
Which ARRAY statement creates the numeric variables Comp1 through Comp25? Select all that apply.
Respuesta
  • array Comp{25};
  • array compute{25} Comp1-Comp25;
  • array comp{25} $;
  • array comp{*} Comp1-Comp25;

Pregunta 118

Pregunta
Which ARRAY statement correctly defines a temporary lookup table named country with three elements that are initialized to AU, NZ, and US?
Respuesta
  • array country{3} _temporary_ ('AU','NZ','US');
  • array country{3} $ 2 _temporary_ (AU,NZ,US);
  • array country{3} $ 2 _temporary_ ('AU','NZ','US');

Pregunta 119

Pregunta
Which statement is false regarding an ARRAY statement?
Respuesta
  • It is an executable statement.
  • It can be used to create variables.
  • It must contain either all numeric or all character elements.
  • It must be used to define an array before the array name can be referenced.

Pregunta 120

Pregunta
What belongs within the braces of this ARRAY statement? array contrib{?} qtr1-qtr4;
Respuesta
  • quarter
  • quarter*
  • 1-4
  • 4

Pregunta 121

Pregunta
Which of the following ARRAY statements is correct?
Respuesta
  • array grades{*} Q1 Q4 Q7 Q8 Q12 Q15;
  • array sites{3} $10;
  • array trials{*} _numeric_;
  • array exp{5} _temporary_ (93 85 77 69 61);
  • All of the above

Pregunta 122

Pregunta
What does the following ARRAY statement do? array seed{*} _character_;
Respuesta
  • This statement creates a temporary array of character variables.
  • This statement creates an array of all previously defined character variables in the DATA step.
  • Nothing. This is not an accurate ARRAY statement.

Pregunta 123

Pregunta
For the program below, select the interative DO statement that processes all elements in the contrib array. data work.contrib; array contrib{4} qtr1-qtr4; _____________ contrib{i}=contrib{i}*1.25; end; run;
Respuesta
  • do i=4;
  • do i=1 to 4;
  • do until i=4;
  • do while i le 4;

Pregunta 124

Pregunta
What is the value of the index variable that references Jul in the statements below? array quarter{4} Jan Apr Jul Oct; do i=1 to 4; yeargoal=quarter{i}*1.2; end;
Respuesta
  • 1
  • 2
  • 3
  • 4

Pregunta 125

Pregunta
Which statement below is false regarding the use of arrays to create variables?
Respuesta
  • The variables are added to the program data vector during the compilation of the DATA step.
  • You do not need to specify the array elements in the ARRAY statement.
  • By default, all character variables are assigned a length of eight.
  • Only character variables can be created.

Pregunta 126

Pregunta
Which of these data sets could be described as a narrow data set?
Respuesta
  • work.a
  • work.b

Pregunta 127

Pregunta
Which data set is more appropriate for using PROC FREQ to determine the number of donations made in each of the four quarters?
Respuesta
  • work.a
  • work.b

Pregunta 128

Pregunta
When using an array to restructure the data, how many array elements would you use if you wanted work.a to look like work.b?
Respuesta
  • 1
  • 3
  • 4
  • 5

Pregunta 129

Pregunta
Which of the following IF statements creates the non-matches seen in the combine data set?
Respuesta
  • if InProd=1 or InCost=1;
  • if InProd=0 or InCost=0;
  • if InProd=0 and InCost=0;

Pregunta 130

Pregunta
What are the names of the two temporary variables created by the BY statement in the code below? data orderdata(keep=Customer_Name Quantity Total_Retail_Price) noorders(keep=Customer_Name Birth_Date); merge orion.customer work.orders_2007(in=order); by Customer_ID; if order=1 then output orderdata; else output noorders; run;
Respuesta
  • FIRST.Order, LAST.Order
  • FIRST.Customer, LAST.Customer
  • FIRST.Customer_ID, LAST.Customer_ID

Pregunta 131

Pregunta
Which statements correctly access the Supplier worksheet in the Excel workbook?
Respuesta
  • libname bonus "&path/BonusGift.xls"; proc print data=bonus.Supplier; run;
  • libname bonus "&path/BonusGift.xls"; proc print data=bonus.'Supplier$'n; run;

Pregunta 132

Pregunta
Which statement is true concerning match-merging?
Respuesta
  • The MERGE statement must refer to permanent data sets.
  • The variables in the BY statement can be in only one of the data sets.
  • Only two data sets can be specified in the MERGE statement.
  • When you use the MERGE statement with the BY statement, the data must be sorted or indexed on the BY variable.

Pregunta 133

Pregunta
Which of the following data set options can be added to the MERGE statement to help identify data set contributors (that is, identify the matches)?
Respuesta
  • IN=
  • OBS=
  • RENAME=
  • MATCHES=

Pregunta 134

Pregunta
The following program will execute without errors: data bonuses; merge managers(in=M) staff(in=S); by EmpID; if M=0 and S=1; run;;
Respuesta
  • True
  • False

Pregunta 135

Pregunta
Which subsetting IF statement selects observations for subsequent processing only if all three input data sets contribute to the current observation? data merged.flowers; merge spring.roses(rename=(red=BrickRed) in=yellow) spring.lilacs(in=purple) spring.petunias(in=pink); by ID; _________________________ run;
Respuesta
  • if yellow=1 and purple=1 or pink=1;
  • if yellow=0 or purple=0 or pink=0;
  • if yellow=1 and purple=1 and pink=1;
  • if yellow=1 or purple=1 and pink=0;

Pregunta 136

Pregunta
The following program will execute without errors:
Respuesta
  • True
  • False

Pregunta 137

Pregunta
The following tables list the variables in three SAS data sets: a, b, and c. Can these three data sets be merged in one DATA step?
Respuesta
  • Yes
  • No

Pregunta 138

Pregunta
Which of the following LIBNAME statements correctly assigns the libref mymusic to the file AllMusic.xls, which is stored in the Entertainment directory of the C: drive on the Windows operating environment?
Respuesta
  • libname mymusic 'Allmusic.xls';
  • libname mymusic 'C:\Entertainment\Allmusic.xls';
  • libname mymusic 'C:\Entertainment\Allmusic';
  • libname mymusic 'C:\Entertainment\Allmusic' filetype='excel';

Pregunta 139

Pregunta
The data sets ensemble.spring and ensemble.summer both contain a variable named Blue, and Blue is not the BY variable. Which program prevents the values of the variable Blue from being overwritten when you merge the two data sets?
Respuesta
  • data ensemble.merged; merge ensemble.spring(keep=blue) ensemble.summer; by fabric; run;
  • data ensemble.merged; merge ensemble.spring(blue=navy) ensemble.summer; by fabric; run;
  • data ensemble.merged; merge ensemble.spring(rename=(blue=navy)) ensemble.summer; by fabric; run;

Pregunta 140

Pregunta
The variable Location appears in the three data sets represented below. Which value appears in the output data set when the three data sets are merged in the order shown?
Respuesta
  • . Florida
  • Canada
  • New York

Pregunta 141

Pregunta
Suppose the empinfo.bonuses data set contains the variables ID, Name, Office, Manager, Location, and Amount. Specify a data set option in the MERGE statement below to use only the variables ID, Name, and Amount in the data set. data mergedata.emppay; merge sales.reps(rename=(office=OfficeNumber)) empinfo.sales empinfo.bonuses ___________________; by ID; run;
Respuesta
  • (drop=ID Name Amount)
  • (output ID Name Amount)
  • (keep=ID Name Amount)
  • (in=ID Name Amount)

Pregunta 142

Pregunta
The control data set that you use to create a format must contain variables that supply the same information as which of the following statements?
Respuesta
  • assignment
  • VALUE
  • INPUT
  • FORMAT

Pregunta 143

Pregunta
SAS stores formats as entries in which of the following?
Respuesta
  • SAS data sets
  • the SAS registry
  • SAS catalogs
  • SAS programs

Pregunta 144

Pregunta
Which of the following PROC FORMAT steps creates a format from the temporary data set citycode and saves the format to sasuser.formats?
Respuesta
  • proc format lib=work cntlin=sasuser.citycode; run;
  • proc format lib=sasuser cntlin=citycode; run;
  • proc format lib=work cntlin=citycode; run;

Pregunta 145

Pregunta
Given the following OPTIONS statement, in what order will SAS search to find a user-defined format? options fmtsearch=(rpt prod.newfmt);
Respuesta
  • work.formats→library.Prod→library.Newfmt
  • work.formats→library.formats→rpt.Formats→prod.Newfmt
  • rpt.Formats→prod.Newfmt→work.formats→library.formats

Pregunta 146

Pregunta
Given the following PROC FORMAT step, select the OPTIONS statement to submit before SAS can use the region format. proc format lib=sasuser; value region 1='North' 2='South' 3='East' 4='West' run;
Respuesta
  • options fmtsearch=(sasuser);
  • options nofmterr;
  • options nofmterr fmtsearch=(work);

Pregunta 147

Pregunta
By default, the FMTERR system option is in effect. If you use a format that SAS cannot load, SAS issues an error message and stops processing the step.
Respuesta
  • True
  • False

Pregunta 148

Pregunta
Which of the following statements can you add to this PROC FORMAT step to document all of the formats in the sasuser.formats catalog except the $geoarea and geopop formats? proc format lib=sasuser fmtlib; ___________________________ run;
Respuesta
  • select geoarea. geopop.;
  • exclude geoarea. geopop.;
  • select $geoarea geopop;
  • exclude $geoarea geopop;
  • exclude $geoarea. geopop.;

Pregunta 149

Pregunta
Which option do you use with PROC FORMAT to document the format in a particular format catalog?
Respuesta
  • FMTSEARCH=
  • FMTERR
  • CATALOG
  • FMTLIB

Pregunta 150

Pregunta
Which PROC FORMAT option do you use to create a SAS data set from a format?
Respuesta
  • . CNTLIN=
  • LIBRARY=
  • CNTLOUT=
  • FMTLIB=

Pregunta 151

Pregunta
By default, user-defined formats are stored in a temporary catalog named work.formats and are deleted at the end of your SAS session.
Respuesta
  • True
  • False

Pregunta 152

Pregunta
Which PROC FORMAT statement option is used to create a permanent format?
Respuesta
  • CNTLIN=
  • FMTLIB=
  • LIBRARY=
  • CNTLOUT=

Pregunta 153

Pregunta
The variables FmtName, Start, and Label are required in order to create a format from an input control data set.
Respuesta
  • True
  • False

Pregunta 154

Pregunta
Given the following OPTIONS statement, in what order will SAS search to find a user-defined format? options fmtsearch=(orion.MyFmts);
Respuesta
  • orion.MyFmts only
  • work.formats→orion.MyFmts→library.formats
  • work.formats→library.formats→orion.MyFmts
  • orion.MyFmts→work.formats→library.formats

Pregunta 155

Pregunta
Which statement best describes the purpose of the output control data set?
Respuesta
  • The output control data set enables you to output one value for one observation that contains the information about the format.
  • The output control data set enables you to output formats without writing VALUE statement in the PROC FORMAT step.
  • The output control data set contains information that describes formats. It is the data set that is created with the CNTLIN= option in the PROC FORMAT statement.
  • The output control data set contains information that describes formats. It is the data set that is created with the CNTLOUT= option in the PROC FORMAT statement.

Pregunta 156

Pregunta
When the NOFMTERR system option is in effect, what happens when SAS encounters a format it can't locate?
Respuesta
  • SAS creates the format in the default work.formats directory and continues processing.
  • SAS substitutes the $w. or w. format and continues processing.
  • SAS stops processing and writes an error message to the log.
  • SAS skips processing at that step and continues with the next step, and writes a note to the log.

Pregunta 157

Pregunta
Which statement is true concerning the FMTLIB option in PROC FORMAT when generating a report for permanent formats?
Respuesta
  • The FMTLIB option in PROC FORMAT prints information about all permanent formats in your SAS session.
  • The FMTLIB option in PROC FORMAT prints information about all of the formats in the work.formats catalog.
  • The FMTLIB option in PROC FORMAT prints information about all of the formats in the LIBRARY.FORMATS option.
  • The FMTLIB option in PROC FORMAT prints information about all formats in the catalog that is specified in the LIBRARY= option.

Pregunta 158

Pregunta
Which procedure enables you to manage a SAS catalog?
Respuesta
  • PROC COPY
  • PROC CATMOD
  • PROC CATALOG
  • PROC CONTENTS

Pregunta 159

Pregunta
In which location can you not use a FORMAT?
Respuesta
  • PUT statement
  • TITLE statement
  • FORMAT= option
  • FORMAT statement

Pregunta 160

Pregunta
Which value statement correctly creates a nested format definition?
Respuesta
  • value $country ' '='Not Available' other=[$country30.];
  • value $extra ' '='Not Available' other=[$country30.];

Pregunta 161

Pregunta
Which statement about PROC SQL is false?
Respuesta
  • PROC SQL stops running only when SAS encounters a QUIT statement.
  • A PROC SQL step can contain more than one SELECT statement.
  • A PROC SQL step creates a report by default.
  • When you use PROC SQL to join tables, you do not need to presort the input tables

Pregunta 162

Pregunta
Which code creates a report that displays two columns from orion.donate? (Assume that the orion library is already defined.)
Respuesta
  • proc sql; from orion.donate select Employee_ID, Amount; quit;
  • proc sql; select Employee_ID, Amount from orion.donate; quit;
  • proc sql; select Employee_ID Amount from orion.donate; quit;
  • proc sql; select Employee_ID, Amount; from orion.donate; quit;

Pregunta 163

Pregunta
Which PROC SQL step creates only an output table named clinic.bills?
Respuesta
  • proc sql; create table clinic.bills; select ID, Date, Fee from clinic.admit; quit;
  • proc sql; create table clinic.bills as select ID, Date, Fee from clinic.admit; quit;
  • proc sql; select ID, Date, Fee from clinic.admit create table as clinic.bills; quit;

Pregunta 164

Pregunta
The tables Orion.customer and orion.country both store country abbreviations in a column named Country. The other columns have unique names. In a PROC SQL step, which SELECT statement correctly joins the two tables on matching values of Country?
Respuesta
  • select Customer_ID, Country, Country_Name from orion.customer, orion.country where Country = Country;
  • select Customer_ID, Country, Country_Name from orion.customer, orion.country where customer.Country = country.Country;
  • select Customer_ID, customer.Country, Country_Name from orion.customer, orion.country where country.Country = customer.Country;

Pregunta 165

Pregunta
This PROC SQL step joins two tables that have only the column Student_Name in common. Which FROM clause correctly completes this step? Select all that apply. proc sql; select r.Student_Name, Course_Number, Balance ___________________ where r.Student_Name= s.Student_Name; quit;
Respuesta
  • from school.register as r, school.students as s
  • from school.register as r, school.students s
  • from school.students as s, school.register as r
  • from school.students as s.students, school.register as r.register

Pregunta 166

Pregunta
PROC SQL stops running when it encounters which of the following?
Respuesta
  • Semicolon
  • FROM clause
  • RUN statement
  • QUIT statement
  • A second SELECT statement

Pregunta 167

Pregunta
In this PROC SQL step, which clause or clauses are written incorrectly? proc sql; select Employee_ID Name Dependents from orion.employees where Salary < 50000; quit;
Respuesta
  • FROM
  • WHERE
  • SELECT

Pregunta 168

Pregunta
When you are joining tables using PROC SQL, you never use a WHERE clause.
Respuesta
  • True
  • False

Pregunta 169

Pregunta
Which code fragment correctly completes the WHERE clause in this PROC SQL step joining the two tables by Policy? proc sql; select claims.Policy, Claim_Num, Dependents from insurance.claims insurance.accounts where _______________= _______________; quit;
Respuesta
  • Policy=Policy
  • claims.Policy=accounts.Policy
  • claims.Policy=insurance.Policy
  • insurance.Policy=insurance.Policy

Pregunta 170

Pregunta
In the SELECT statement, when is a WHERE clause required?
Respuesta
  • always
  • only when querying one table
  • only when joining tables
  • never

Pregunta 171

Pregunta
Airline.expenses and airline.revenue both have 30 rows, and one column in common named Flight_ID. Each row in the first table has a value of Flight_ID that matches the Flight_ID value in one and only one row in the second table. When you run this PROC SQL program, how many rows appear in the result set? proc sql; select expenses.Flight_ID, Amount, Date from airline.expenses, airline.revenue; quit;
Respuesta
  • 0
  • 30
  • 60
  • 900

Pregunta 172

Pregunta
The tables orion.orders and orion.customers have the common column Customer_ID. What output does this program generate? proc sql; select Order_ID, Customer_ID, Order_Type from orion.orders; select Customer_ID, Customer_Age_Group, Order_Type from orion.customers; quit;
Respuesta
  • no output
  • one report that contains a Cartesian product
  • two reports that contain query results
  • two reports and two output data sets

Pregunta 173

Pregunta
Will this PROC SQL step run? proc sql; select SaleDate from company.sales where SaleAmt>500; quit;
Respuesta
  • YES
  • NO

Pregunta 174

Pregunta
The table insurance.claims contains the columns Policy, Claim_Num, and Status. The table insurance.accounts also contains the column Policy. These two tables are not sorted. Will this PROC SQL step create a report? proc sql; select accounts.Policy, Claim_Num, Status from insurance.claims, insurance.accounts where accounts.Policy = claims.Policy; quit;
Respuesta
  • Yes
  • No, because the FROM clause lists the tables in the wrong order.
  • No, because the input tables were not sorted first.
  • No, because some of the columns in the SELECT clause are not qualified.
  • No, because this program creates an output table instead of a report.

Pregunta 175

Pregunta
Which code fragment completes the FROM clause in this PROC SQL step? proc sql; select x.Policy, Claim_Num, Status from insurance.claims ___ insurance.accounts x where x.Policy = y.Policy; quit;
Respuesta
  • x
  • x,
  • y
  • y,
  • c

Pregunta 176

Pregunta
Which of the following statements about the SAS macro facility are true?
Respuesta
  • The SAS macro facility enables you to package text into units that have names.
  • The SAS macro facility enables you to improve your efficiency as a SAS programmer.
  • The SAS macro facility includes its own language, which is called the SAS macro language.
  • All of the above

Pregunta 177

Pregunta
Which of the following statements is true about macro variables?
Respuesta
  • SAS assigns names and values to automatic macro variables; the programmer assigns names and values to user-defined macro variables.
  • Neither automatic nor user-defined macro variables are part of a SAS data set.
  • Both automatic and user-defined macro variables can only have values that are text strings.
  • All of the above

Pregunta 178

Pregunta
Which of the following macro variable references will the macro processor correctly interpret? Select all that apply.
Respuesta
  • proc print data=mydata; where sales >= &total; run;
  • proc print data=&mydata; run;
  • title 'Totals for &Month'; proc print data=mydata; run;

Pregunta 179

Pregunta
What is the value and length of the macro variable fname, based on the %LET statement shown below? %let fname= Marie
Respuesta
  • 11
  • 5
  • 6

Pregunta 180

Pregunta
What is the value and length of the macro variable name, based on the %LET statement shown below? %let name="Marie Hudson";
Respuesta
  • 14
  • 12
  • 13

Pregunta 181

Pregunta
What is the value and length of the macro variable total, based on the %LET statement shown below? %let total=10+2;
Respuesta
  • Value Length (missing value) 0
  • Value Length 12 2
  • Value Length 10+2 4

Pregunta 182

Pregunta
Which of the following statements or programs does not correctly display the value of the macro variable month to the SAS log?
Respuesta
  • options &month; proc print data=&month; run;
  • %put &month;
  • options symbolgen; proc print data=&month; run
  • %put the macro variable Month has the value &month;

Pregunta 183

Pregunta
What does the SAS macro facility include?
Respuesta
  • a. the SAS macro compiler
  • b. the SAS macro processor
  • c. the SAS macro debugger
  • d. the SAS macro language
  • b and d

Pregunta 184

Pregunta
What is the benefit of using the SAS macro facility?
Respuesta
  • The SAS macro facility enables you to reduce the amount of text you must enter in your programs
  • The SAS macro facility enables you to write programs that are easily modified and customized.
  • The SAS macro facility enable you to automatically reference system information in your programs.
  • all of the above

Pregunta 185

Pregunta
Which statement correctly defines a SAS macro variable?
Respuesta
  • A SAS macro variable is a data set variable whose value depends on the observation that is being processed.
  • A SAS macro variable is independent of a SAS data set and contains a text string. The value of the macro variable remains constant until you change it.

Pregunta 186

Pregunta
Which program correctly references the automatic macro variable SYSDATE?
Respuesta
  • title "June Totals as of &sysdate"; data sales.juntot; set sales.total; if month=6 and year=2008; run;
  • title "June Totals as of sysdate"; data sales.juntot; set sales.juntot; if month=6 and year=2008; run;

Pregunta 187

Pregunta
Which of the following statements creates a macro variable named rate that has a value of 23?
Respuesta
  • let rate="23";
  • &let rate=23;
  • %let rate=23;
  • %let rate="23";

Pregunta 188

Pregunta
What is the value of the macro variable rate after this statement is processed? %let rate=4+3;
Respuesta
  • 7
  • 4+3
  • _NULL_

Pregunta 189

Pregunta
What is the result of including the following line in your program? options symbolgen;
Respuesta
  • Messages about macro variable resolution are listed in the program output.
  • Messages about macro variable resolution are suppressed in the program output
  • Messages about macro variable resolution are written to the SAS log.
  • Messages about macro variable resolution are suppressed in the SAS log.

Pregunta 190

Pregunta
Which assignment statement sets the value of Day to a text string that contains the day of the week that the current SAS session began?
Respuesta
  • Day=sysday;
  • Day=&sysday;
  • Day='&sysday';
  • Day="&sysday";

Pregunta 191

Pregunta
. When you submit a program that includes references to macro variables, when does SAS replace those references with macro variable values?
Respuesta
  • before compilation of the program
  • during compilation of the program
  • after compilation but before execution of the program
  • during execution of the program

Pregunta 192

Pregunta
Which of the following is NOT a valid name for a user-defined macro variable?
Respuesta
  • month
  • _year
  • sysver
  • total_sales

Pregunta 193

Pregunta
Which of the following lists the steps in the programming process correctly?
Respuesta
  • a. 1. Write a SAS program. 2. Debug or modify. 3. Run the program. 4. Review the results. 5. Define the business need.
  • b. 1. Define the business need. 2. Write a SAS program. 3. Run the program. 4. Review the results. 5. Debug or modify.

Pregunta 194

Pregunta
Are raw data files created only by SAS?
Respuesta
  • Yes
  • No

Pregunta 195

Pregunta
Using SAS, you can read many kinds of data.
Respuesta
  • True
  • False

Pregunta 196

Pregunta
What does a SAS program file contain?
Respuesta
  • SAS programming code
  • data specific to SAS
  • an embedded Excel worksheet

Pregunta 197

Pregunta
Are SAS data sets created only by SAS?
Respuesta
  • Yes
  • No

Pregunta 198

Pregunta
Can a SAS program be saved and reused?
Respuesta
  • Yes
  • No

Pregunta 199

Pregunta
How many step boundaries does this program contain? data work.staff; length First_Name $ 12 Last_Name $ 18 Job_Title $ 25; infile "&path/newemployees.csv" dlm=','; input First_Name $ Last_Name$ Job_Title $ Salary; run; proc print data=work.staff; run; proc means data=work.staff; var Salary; run;
Respuesta
  • four
  • five
  • six
  • seven

Pregunta 200

Pregunta
Which of the following is a SAS syntax requirement?
Respuesta
  • Begin each statement in column one.
  • Put only one statement on each line.
  • Separate each step with a line space.
  • End each statement with a semicolon.
  • Put a RUN statement after every DATA or PROC step.
Mostrar resumen completo Ocultar resumen completo

Similar

FUNDAMENTOS DE REDES DE COMPUTADORAS
anhita
Test: "La computadora y sus partes"
Dayana Quiros R
Abreviaciones comunes en programación web
Diego Santos
Seguridad en la red
Diego Santos
Conceptos básicos de redes
ARISAI DARIO BARRAGAN LOPEZ
Excel Básico-Intermedio
Diego Santos
Evolución de la Informática
Diego Santos
Introducción a la Ingeniería de Software
David Pacheco Ji
La ingenieria de requerimientos
Sergio Abdiel He
TECNOLOGÍA TAREA
Denisse Alcalá P
Navegadores de Internet
M Siller