Isma1

Descrição

Isma1
Ismael Civicos
Quiz por Ismael Civicos, atualizado more than 1 year ago
Ismael Civicos
Criado por Ismael Civicos mais de 6 anos atrás
347
0

Resumo de Recurso

Questão 1

Questão
Which of the following statements correctly describes a delimited raw data file? Select all that apply.
Responda
  • 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.

Questão 2

Questão
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?
Responda
  • yes
  • no

Questão 3

Questão
Which of the following statements is true?
Responda
  • 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

Questão 4

Questão
Which statement is true of a DATA step when reading from a raw data file?
Responda
  • 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.

Questão 5

Questão
Which of the LENGTH statements below creates the character variable SalesRep with a length of 18?
Responda
  • length $ SalesRep 18;
  • length SalesRep 18;
  • length SalesRep $ 18;
  • length SalesRep=18;

Questão 6

Questão
Which of the DATA steps below creates the variable SalesRep with a length of 18?
Responda
  • 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;

Questão 7

Questão
Which of these statements is not true about a SAS informat?
Responda
  • 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.

Questão 8

Questão
Which of the following DATA steps correctly reads instream data as input for the data set?
Responda
  • 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 $; ;

Questão 9

Questão
What does SAS do when it encounters a data error in a raw data record? Select all that apply.
Responda
  • 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

Questão 10

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

Questão 11

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

Questão 12

Questão
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.
Responda
  • True
  • False

Questão 13

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

Questão 14

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

Questão 15

Questão
Which of the following can determine the length of a new variable?
Responda
  • the length of the variable's first value
  • the assignment statement
  • the LENGTH statement
  • all of the above

Questão 16

Questão
Which of the following SAS functions returns a number from 1 to 12?
Responda
  • YEAR(SAS-date)
  • MONTH(SAS-date)
  • WEEKDAY(SAS-date)
  • TODAY(SAS-date)

Questão 17

Questão
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.
Responda
  • True
  • False

Questão 18

Questão
Which DATA step ensures that all observations are assigned a nonmissing value for Bonus?
Responda
  • 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;

Questão 19

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

Questão 20

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

Questão 21

Questão
Which SET statement has correct syntax?
Responda
  • 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);

Questão 22

Questão
Which of the following statements is true about merging SAS data sets by using the DATA step?
Responda
  • 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

Questão 23

Questão
Which of the following programs concatenates the data sets, sales and products, in that order?
Responda
  • data newsales; set products sales; run;
  • data newsales; set sales products; run;
  • data newsales; set sales; set products; run;

Questão 24

Questão
If you run this DATA step, what observations does the data set bonuses contain? data bonuses; merge managers staff; by EmpID; run;
Responda
  • 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

Questão 25

Questão
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;
Responda
  • 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.

Questão 26

Questão
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;
Responda
  • 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

Questão 27

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

Questão 28

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

Questão 29

Questão
Which of these procedures produces output that is most useful for detecting duplicate values?
Responda
  • PROC PRINT
  • PROC FREQ
  • PROC MEANS
  • PROC UNIVARIATE

Questão 30

Questão
Which of these programs is most useful for determining the exact observation that contains a numeric variable with an extreme value?
Responda
  • 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;

Questão 31

Questão
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?
Responda
  • PROC PRINT
  • PROC FREQ
  • PROC MEANS
  • PROC UNIVARIATE

Questão 32

Questão
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)
Responda
  • True
  • False

Questão 33

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

Questão 34

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

Questão 35

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

Questão 36

Questão
Which program correctly opens and closes the LISTING destination?
Responda
  • 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;

Questão 37

Questão
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;
Responda
  • 6 observations, 4 variables
  • 6 observations, 3 variables
  • 12 observations, 4 variables

Questão 38

Questão
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;
Responda
  • 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

Questão 39

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

Questão 40

Questão
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;
Responda
  • a. 6
  • b. 3
  • c. 9

Questão 41

Questão
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.
Responda
  • 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;

Questão 42

Questão
Which program reads data from observation 100 to observation 200 and prints 50 observations?
Responda
  • 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;

Questão 43

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

Questão 44

Questão
What must happen in the DATA step to summarize data by groups? Select all that apply.
Responda
  • 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.

Questão 45

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

Questão 46

Questão
Which statement retains the value of Sales2Dte in the PDV across iterations of the DATA step?
Responda
  • Total_Retail_Price+Sales2Dte;
  • Sales2Dte+Total_Retail_Price;
  • Sales2Dte=Sales2Dte+Total_Retail_Price;

Questão 47

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

Questão 48

Questão
Which statement is true about the following program? data payroll.empmast; set payroll.employee; by gender jobcode; run;
Responda
  • 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.

Questão 49

Questão
Which statement is false about BY-group processing when you use the BY statement with the SET statement?
Responda
  • 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.

Questão 50

Questão
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?
Responda
  • 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

Questão 51

Questão
When using the DATA step to summarize grouped data, what is the first step in the process?
Responda
  • 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).

Questão 52

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

Questão 53

Questão
Which raw data value below is an example of nonstandard numeric data?
Responda
  • 234.908
  • -234.908
  • $234,908.00
  • 23E4

Questão 54

Questão
Can you use column input to read both standard and nonstandard data in fixed fields?
Responda
  • Yes
  • No

Questão 55

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

Questão 56

Questão
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.
Responda
  • input Item $9. @20 Quantity 3.;
  • input Item $9. +10 Quantity 3.;
  • input Item $9. +11 Quantity 3.;

Questão 57

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

Questão 58

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

Questão 59

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

Questão 60

Questão
The width of the input field can be specified by an informat when used with formatted input.
Responda
  • True
  • False

Questão 61

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

Questão 62

Questão
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)?
Responda
  • input Item $9. @20 Quantity 3.;
  • input Item $9. +10 Quantity 3.;
  • . input Item $9. +11 Quantity 3.;

Questão 63

Questão
Which of the following INPUT statements correctly reads the values for Fname (in the second field), Lname, Department, and Salary (in that order)?
Responda
  • 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

Questão 64

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

Questão 65

Questão
What does a forward slash (/) indicate when used in an INPUT statement?
Responda
  • 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

Questão 66

Questão
When you use a trailing @, which of the following things occur?
Responda
  • 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

Questão 67

Questão
Generally, the most efficient place to put a subsetting IF statement is as early as possible in the DATA step
Responda
  • True
  • False

Questão 68

Questão
Which of the following statements is false?
Responda
  • 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.

Questão 69

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

Questão 70

Questão
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
Responda
  • E
  • PERSONNEL DIRECTOR
  • MATTHEWS
  • PERSONNEL

Questão 71

Questão
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
Responda
  • . 4
  • 6

Questão 72

Questão
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;
Responda
  • scan(Text,-1)
  • scan(Text,6)
  • scan(Text,6,', ')

Questão 73

Questão
Which of the following FIND functions returns the value 1?
Responda
  • 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)

Questão 74

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

Questão 75

Questão
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.
Responda
  • Country=tranwrd('Burma','Myanmar');
  • Country=tranwrd(Country,Burma,Myanmar);
  • Country=tranwrd(Country,'Burma','Myanmar');

Questão 76

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

Questão 77

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

Questão 78

Questão
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;
Responda
  • 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.

Questão 79

Questão
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?
Responda
  • TargetNo=input(Target,comma6.);
  • TargetNo=input(Target,comma7.);
  • TargetNo=put(Target,comma6.);
  • TargetNo=put(Target,comma7.);

Questão 80

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

Questão 81

Questão
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?
Responda
  • a. Total=sum(of Year1-Year4);
  • b. Total=sum(of Year2--Year4);
  • c. Total=sum(of Year:);
  • d. All of the above

Questão 82

Questão
Which function returns the greatest integer less than or equal to the argument?
Responda
  • a. CEIL
  • b. INT
  • c. FLOOR

Questão 83

Questão
Which value is returned from the following statement? x=int(7.89)
Responda
  • a. 7
  • b. 7.8
  • c. 8

Questão 84

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

Questão 85

Questão
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;
Responda
  • 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.

Questão 86

Questão
Which of the following functions can convert the values of the numeric variable Level to character values?
Responda
  • put(Level,3.)
  • input(3.,Level)
  • put(3.,Level)
  • input(Level,3.)

Questão 87

Questão
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?
Responda
  • Location=Dept||'/'||put(SiteNum, $3);
  • Location=Dept||'/'||put(SiteNum,4);
  • Location=Dept||'/'||put(SiteNum,3.1);
  • Location=Dept||'/'||put(SiteNum,4.1);

Questão 88

Questão
Which of the following functions converts the character values of Base to numeric values?
Responda
  • put(comma10.2,Base)
  • put(Base,comma10.2)
  • input(Base,comma10.2)
  • input(comma10.2, Base)

Questão 89

Questão
AvgSale=input(AvgSale,comma6.);
Responda
  • yes
  • no

Questão 90

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

Questão 91

Questão
What will this PUTLOG statement do?
Responda
  • 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

Questão 92

Questão
Which of the following represents acceptable syntax for the END= option in the INFILE statement?
Responda
  • infile work.catalog end=last;
  • infile work.catalog end.last;
  • infile catalog end=last;
  • infile catalog end.last;

Questão 93

Questão
Is it acceptable to use the END= option in both SET and INFILE statements?
Responda
  • yes
  • no

Questão 94

Questão
When a logic error occurs, SAS writes an error message to the log.
Responda
  • True
  • False

Questão 95

Questão
Which of the following is not a task of the PUTLOG statement?
Responda
  • 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.

Questão 96

Questão
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?
Responda
  • putlog Title $quote20.;
  • putlog Title $quote22.;
  • putlog Title $quote30.;

Questão 97

Questão
The END= option in the SET or INFILE statement indicates that SAS should process the last observation.
Responda
  • True
  • False

Questão 98

Questão
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;
Responda
  • 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

Questão 99

Questão
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;
Responda
  • do while(Capital ge 500000);
  • do while(Capital=500000);
  • do while(Capital le 500000);
  • do while(Capital>500000);

Questão 100

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

Questão 101

Questão
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;
Responda
  • 12
  • 15
  • 16
  • unknkown

Questão 102

Questão
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;
Responda
  • 0
  • 5
  • 20
  • 21

Questão 103

Questão
Which statement is false regarding nested DO loops?
Responda
  • 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.

Questão 104

Questão
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;
Responda
  • 0
  • 1
  • 12
  • 13

Questão 105

Questão
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;
Responda
  • . missing
  • 2008
  • 2012
  • 2013

Questão 106

Questão
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;
Responda
  • 12
  • 15
  • 16
  • This loop executes infinitely

Questão 107

Questão
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;
Responda
  • 4
  • 8
  • 16
  • 20

Questão 108

Questão
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;
Responda
  • 0
  • 1
  • 12
  • 13

Questão 109

Questão
Which of the following statements will not execute a DO loop?
Responda
  • 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;

Questão 110

Questão
How many times does the DO loop execute for the first iteration of the DATA step?
Responda
  • 1
  • 5
  • 3
  • 4

Questão 111

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

Questão 112

Questão
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;
Responda
  • 12
  • 15
  • 16
  • unknown

Questão 113

Questão
Which statement about SAS arrays is true?
Responda
  • 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

Questão 114

Questão
Which of the following ARRAY statements is correct?
Responda
  • 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;

Questão 115

Questão
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?
Responda
  • array test{*} T1 T2 T3 T4 T5;
  • array test{5} T1-T5;
  • array test{*} _numeric_;
  • all of the above

Questão 116

Questão
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;
Responda
  • 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;

Questão 117

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

Questão 118

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

Questão 119

Questão
Which statement is false regarding an ARRAY statement?
Responda
  • 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.

Questão 120

Questão
What belongs within the braces of this ARRAY statement? array contrib{?} qtr1-qtr4;
Responda
  • quarter
  • quarter*
  • 1-4
  • 4

Questão 121

Questão
Which of the following ARRAY statements is correct?
Responda
  • 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

Questão 122

Questão
What does the following ARRAY statement do? array seed{*} _character_;
Responda
  • 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.

Questão 123

Questão
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;
Responda
  • do i=4;
  • do i=1 to 4;
  • do until i=4;
  • do while i le 4;

Questão 124

Questão
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;
Responda
  • 1
  • 2
  • 3
  • 4

Questão 125

Questão
Which statement below is false regarding the use of arrays to create variables?
Responda
  • 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.

Questão 126

Questão
Which of these data sets could be described as a narrow data set?
Responda
  • work.a
  • work.b

Questão 127

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

Questão 128

Questão
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?
Responda
  • 1
  • 3
  • 4
  • 5

Questão 129

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

Questão 130

Questão
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;
Responda
  • FIRST.Order, LAST.Order
  • FIRST.Customer, LAST.Customer
  • FIRST.Customer_ID, LAST.Customer_ID

Questão 131

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

Questão 132

Questão
Which statement is true concerning match-merging?
Responda
  • 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.

Questão 133

Questão
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)?
Responda
  • IN=
  • OBS=
  • RENAME=
  • MATCHES=

Questão 134

Questão
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;;
Responda
  • True
  • False

Questão 135

Questão
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;
Responda
  • 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;

Questão 136

Questão
The following program will execute without errors:
Responda
  • True
  • False

Questão 137

Questão
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?
Responda
  • Yes
  • No

Questão 138

Questão
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?
Responda
  • libname mymusic 'Allmusic.xls';
  • libname mymusic 'C:\Entertainment\Allmusic.xls';
  • libname mymusic 'C:\Entertainment\Allmusic';
  • libname mymusic 'C:\Entertainment\Allmusic' filetype='excel';

Questão 139

Questão
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?
Responda
  • 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;

Questão 140

Questão
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?
Responda
  • . Florida
  • Canada
  • New York

Questão 141

Questão
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;
Responda
  • (drop=ID Name Amount)
  • (output ID Name Amount)
  • (keep=ID Name Amount)
  • (in=ID Name Amount)

Questão 142

Questão
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?
Responda
  • assignment
  • VALUE
  • INPUT
  • FORMAT

Questão 143

Questão
SAS stores formats as entries in which of the following?
Responda
  • SAS data sets
  • the SAS registry
  • SAS catalogs
  • SAS programs

Questão 144

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

Questão 145

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

Questão 146

Questão
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;
Responda
  • options fmtsearch=(sasuser);
  • options nofmterr;
  • options nofmterr fmtsearch=(work);

Questão 147

Questão
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.
Responda
  • True
  • False

Questão 148

Questão
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;
Responda
  • select geoarea. geopop.;
  • exclude geoarea. geopop.;
  • select $geoarea geopop;
  • exclude $geoarea geopop;
  • exclude $geoarea. geopop.;

Questão 149

Questão
Which option do you use with PROC FORMAT to document the format in a particular format catalog?
Responda
  • FMTSEARCH=
  • FMTERR
  • CATALOG
  • FMTLIB

Questão 150

Questão
Which PROC FORMAT option do you use to create a SAS data set from a format?
Responda
  • . CNTLIN=
  • LIBRARY=
  • CNTLOUT=
  • FMTLIB=

Questão 151

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

Questão 152

Questão
Which PROC FORMAT statement option is used to create a permanent format?
Responda
  • CNTLIN=
  • FMTLIB=
  • LIBRARY=
  • CNTLOUT=

Questão 153

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

Questão 154

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

Questão 155

Questão
Which statement best describes the purpose of the output control data set?
Responda
  • 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.

Questão 156

Questão
When the NOFMTERR system option is in effect, what happens when SAS encounters a format it can't locate?
Responda
  • 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.

Questão 157

Questão
Which statement is true concerning the FMTLIB option in PROC FORMAT when generating a report for permanent formats?
Responda
  • 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.

Questão 158

Questão
Which procedure enables you to manage a SAS catalog?
Responda
  • PROC COPY
  • PROC CATMOD
  • PROC CATALOG
  • PROC CONTENTS

Questão 159

Questão
In which location can you not use a FORMAT?
Responda
  • PUT statement
  • TITLE statement
  • FORMAT= option
  • FORMAT statement

Questão 160

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

Questão 161

Questão
Which statement about PROC SQL is false?
Responda
  • 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

Questão 162

Questão
Which code creates a report that displays two columns from orion.donate? (Assume that the orion library is already defined.)
Responda
  • 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;

Questão 163

Questão
Which PROC SQL step creates only an output table named clinic.bills?
Responda
  • 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;

Questão 164

Questão
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?
Responda
  • 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;

Questão 165

Questão
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;
Responda
  • 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

Questão 166

Questão
PROC SQL stops running when it encounters which of the following?
Responda
  • Semicolon
  • FROM clause
  • RUN statement
  • QUIT statement
  • A second SELECT statement

Questão 167

Questão
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;
Responda
  • FROM
  • WHERE
  • SELECT

Questão 168

Questão
When you are joining tables using PROC SQL, you never use a WHERE clause.
Responda
  • True
  • False

Questão 169

Questão
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;
Responda
  • Policy=Policy
  • claims.Policy=accounts.Policy
  • claims.Policy=insurance.Policy
  • insurance.Policy=insurance.Policy

Questão 170

Questão
In the SELECT statement, when is a WHERE clause required?
Responda
  • always
  • only when querying one table
  • only when joining tables
  • never

Questão 171

Questão
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;
Responda
  • 0
  • 30
  • 60
  • 900

Questão 172

Questão
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;
Responda
  • no output
  • one report that contains a Cartesian product
  • two reports that contain query results
  • two reports and two output data sets

Questão 173

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

Questão 174

Questão
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;
Responda
  • 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.

Questão 175

Questão
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;
Responda
  • x
  • x,
  • y
  • y,
  • c

Questão 176

Questão
Which of the following statements about the SAS macro facility are true?
Responda
  • 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

Questão 177

Questão
Which of the following statements is true about macro variables?
Responda
  • 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

Questão 178

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

Questão 179

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

Questão 180

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

Questão 181

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

Questão 182

Questão
Which of the following statements or programs does not correctly display the value of the macro variable month to the SAS log?
Responda
  • 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;

Questão 183

Questão
What does the SAS macro facility include?
Responda
  • a. the SAS macro compiler
  • b. the SAS macro processor
  • c. the SAS macro debugger
  • d. the SAS macro language
  • b and d

Questão 184

Questão
What is the benefit of using the SAS macro facility?
Responda
  • 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

Questão 185

Questão
Which statement correctly defines a SAS macro variable?
Responda
  • 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.

Questão 186

Questão
Which program correctly references the automatic macro variable SYSDATE?
Responda
  • 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;

Questão 187

Questão
Which of the following statements creates a macro variable named rate that has a value of 23?
Responda
  • let rate="23";
  • &let rate=23;
  • %let rate=23;
  • %let rate="23";

Questão 188

Questão
What is the value of the macro variable rate after this statement is processed? %let rate=4+3;
Responda
  • 7
  • 4+3
  • _NULL_

Questão 189

Questão
What is the result of including the following line in your program? options symbolgen;
Responda
  • 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.

Questão 190

Questão
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?
Responda
  • Day=sysday;
  • Day=&sysday;
  • Day='&sysday';
  • Day="&sysday";

Questão 191

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

Questão 192

Questão
Which of the following is NOT a valid name for a user-defined macro variable?
Responda
  • month
  • _year
  • sysver
  • total_sales

Questão 193

Questão
Which of the following lists the steps in the programming process correctly?
Responda
  • 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.

Questão 194

Questão
Are raw data files created only by SAS?
Responda
  • Yes
  • No

Questão 195

Questão
Using SAS, you can read many kinds of data.
Responda
  • True
  • False

Questão 196

Questão
What does a SAS program file contain?
Responda
  • SAS programming code
  • data specific to SAS
  • an embedded Excel worksheet

Questão 197

Questão
Are SAS data sets created only by SAS?
Responda
  • Yes
  • No

Questão 198

Questão
Can a SAS program be saved and reused?
Responda
  • Yes
  • No

Questão 199

Questão
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;
Responda
  • four
  • five
  • six
  • seven

Questão 200

Questão
Which of the following is a SAS syntax requirement?
Responda
  • 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.

Semelhante

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