Isma1

Beschreibung

Isma1
Ismael Civicos
Quiz von Ismael Civicos, aktualisiert more than 1 year ago
Ismael Civicos
Erstellt von Ismael Civicos vor mehr als 6 Jahre
347
0

Zusammenfassung der Ressource

Frage 1

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

Frage 2

Frage
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?
Antworten
  • yes
  • no

Frage 3

Frage
Which of the following statements is true?
Antworten
  • 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

Frage 4

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

Frage 5

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

Frage 6

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

Frage 7

Frage
Which of these statements is not true about a SAS informat?
Antworten
  • 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.

Frage 8

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

Frage 9

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

Frage 10

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

Frage 11

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

Frage 12

Frage
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.
Antworten
  • True
  • False

Frage 13

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

Frage 14

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

Frage 15

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

Frage 16

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

Frage 17

Frage
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.
Antworten
  • True
  • False

Frage 18

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

Frage 19

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

Frage 20

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

Frage 21

Frage
Which SET statement has correct syntax?
Antworten
  • 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);

Frage 22

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

Frage 23

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

Frage 24

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

Frage 25

Frage
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;
Antworten
  • 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.

Frage 26

Frage
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;
Antworten
  • 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

Frage 27

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

Frage 28

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

Frage 29

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

Frage 30

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

Frage 31

Frage
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?
Antworten
  • PROC PRINT
  • PROC FREQ
  • PROC MEANS
  • PROC UNIVARIATE

Frage 32

Frage
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)
Antworten
  • True
  • False

Frage 33

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

Frage 34

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

Frage 35

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

Frage 36

Frage
Which program correctly opens and closes the LISTING destination?
Antworten
  • 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;

Frage 37

Frage
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;
Antworten
  • 6 observations, 4 variables
  • 6 observations, 3 variables
  • 12 observations, 4 variables

Frage 38

Frage
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;
Antworten
  • 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

Frage 39

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

Frage 40

Frage
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;
Antworten
  • a. 6
  • b. 3
  • c. 9

Frage 41

Frage
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.
Antworten
  • 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;

Frage 42

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

Frage 43

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

Frage 44

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

Frage 45

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

Frage 46

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

Frage 47

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

Frage 48

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

Frage 49

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

Frage 50

Frage
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?
Antworten
  • 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

Frage 51

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

Frage 52

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

Frage 53

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

Frage 54

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

Frage 55

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

Frage 56

Frage
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.
Antworten
  • input Item $9. @20 Quantity 3.;
  • input Item $9. +10 Quantity 3.;
  • input Item $9. +11 Quantity 3.;

Frage 57

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

Frage 58

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

Frage 59

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

Frage 60

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

Frage 61

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

Frage 62

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

Frage 63

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

Frage 64

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

Frage 65

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

Frage 66

Frage
When you use a trailing @, which of the following things occur?
Antworten
  • 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

Frage 67

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

Frage 68

Frage
Which of the following statements is false?
Antworten
  • 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.

Frage 69

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

Frage 70

Frage
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
Antworten
  • E
  • PERSONNEL DIRECTOR
  • MATTHEWS
  • PERSONNEL

Frage 71

Frage
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
Antworten
  • . 4
  • 6

Frage 72

Frage
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;
Antworten
  • scan(Text,-1)
  • scan(Text,6)
  • scan(Text,6,', ')

Frage 73

Frage
Which of the following FIND functions returns the value 1?
Antworten
  • 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)

Frage 74

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

Frage 75

Frage
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.
Antworten
  • Country=tranwrd('Burma','Myanmar');
  • Country=tranwrd(Country,Burma,Myanmar);
  • Country=tranwrd(Country,'Burma','Myanmar');

Frage 76

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

Frage 77

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

Frage 78

Frage
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;
Antworten
  • 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.

Frage 79

Frage
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?
Antworten
  • TargetNo=input(Target,comma6.);
  • TargetNo=input(Target,comma7.);
  • TargetNo=put(Target,comma6.);
  • TargetNo=put(Target,comma7.);

Frage 80

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

Frage 81

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

Frage 82

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

Frage 83

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

Frage 84

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

Frage 85

Frage
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;
Antworten
  • 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.

Frage 86

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

Frage 87

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

Frage 88

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

Frage 89

Frage
AvgSale=input(AvgSale,comma6.);
Antworten
  • yes
  • no

Frage 90

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

Frage 91

Frage
What will this PUTLOG statement do?
Antworten
  • 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

Frage 92

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

Frage 93

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

Frage 94

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

Frage 95

Frage
Which of the following is not a task of the PUTLOG statement?
Antworten
  • 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.

Frage 96

Frage
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?
Antworten
  • putlog Title $quote20.;
  • putlog Title $quote22.;
  • putlog Title $quote30.;

Frage 97

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

Frage 98

Frage
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;
Antworten
  • 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

Frage 99

Frage
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;
Antworten
  • do while(Capital ge 500000);
  • do while(Capital=500000);
  • do while(Capital le 500000);
  • do while(Capital>500000);

Frage 100

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

Frage 101

Frage
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;
Antworten
  • 12
  • 15
  • 16
  • unknkown

Frage 102

Frage
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;
Antworten
  • 0
  • 5
  • 20
  • 21

Frage 103

Frage
Which statement is false regarding nested DO loops?
Antworten
  • 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.

Frage 104

Frage
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;
Antworten
  • 0
  • 1
  • 12
  • 13

Frage 105

Frage
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;
Antworten
  • . missing
  • 2008
  • 2012
  • 2013

Frage 106

Frage
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;
Antworten
  • 12
  • 15
  • 16
  • This loop executes infinitely

Frage 107

Frage
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;
Antworten
  • 4
  • 8
  • 16
  • 20

Frage 108

Frage
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;
Antworten
  • 0
  • 1
  • 12
  • 13

Frage 109

Frage
Which of the following statements will not execute a DO loop?
Antworten
  • 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;

Frage 110

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

Frage 111

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

Frage 112

Frage
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;
Antworten
  • 12
  • 15
  • 16
  • unknown

Frage 113

Frage
Which statement about SAS arrays is true?
Antworten
  • 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

Frage 114

Frage
Which of the following ARRAY statements is correct?
Antworten
  • 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;

Frage 115

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

Frage 116

Frage
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;
Antworten
  • 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;

Frage 117

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

Frage 118

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

Frage 119

Frage
Which statement is false regarding an ARRAY statement?
Antworten
  • 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.

Frage 120

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

Frage 121

Frage
Which of the following ARRAY statements is correct?
Antworten
  • 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

Frage 122

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

Frage 123

Frage
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;
Antworten
  • do i=4;
  • do i=1 to 4;
  • do until i=4;
  • do while i le 4;

Frage 124

Frage
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;
Antworten
  • 1
  • 2
  • 3
  • 4

Frage 125

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

Frage 126

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

Frage 127

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

Frage 128

Frage
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?
Antworten
  • 1
  • 3
  • 4
  • 5

Frage 129

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

Frage 130

Frage
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;
Antworten
  • FIRST.Order, LAST.Order
  • FIRST.Customer, LAST.Customer
  • FIRST.Customer_ID, LAST.Customer_ID

Frage 131

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

Frage 132

Frage
Which statement is true concerning match-merging?
Antworten
  • 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.

Frage 133

Frage
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)?
Antworten
  • IN=
  • OBS=
  • RENAME=
  • MATCHES=

Frage 134

Frage
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;;
Antworten
  • True
  • False

Frage 135

Frage
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;
Antworten
  • 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;

Frage 136

Frage
The following program will execute without errors:
Antworten
  • True
  • False

Frage 137

Frage
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?
Antworten
  • Yes
  • No

Frage 138

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

Frage 139

Frage
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?
Antworten
  • 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;

Frage 140

Frage
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?
Antworten
  • . Florida
  • Canada
  • New York

Frage 141

Frage
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;
Antworten
  • (drop=ID Name Amount)
  • (output ID Name Amount)
  • (keep=ID Name Amount)
  • (in=ID Name Amount)

Frage 142

Frage
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?
Antworten
  • assignment
  • VALUE
  • INPUT
  • FORMAT

Frage 143

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

Frage 144

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

Frage 145

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

Frage 146

Frage
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;
Antworten
  • options fmtsearch=(sasuser);
  • options nofmterr;
  • options nofmterr fmtsearch=(work);

Frage 147

Frage
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.
Antworten
  • True
  • False

Frage 148

Frage
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;
Antworten
  • select geoarea. geopop.;
  • exclude geoarea. geopop.;
  • select $geoarea geopop;
  • exclude $geoarea geopop;
  • exclude $geoarea. geopop.;

Frage 149

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

Frage 150

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

Frage 151

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

Frage 152

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

Frage 153

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

Frage 154

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

Frage 155

Frage
Which statement best describes the purpose of the output control data set?
Antworten
  • 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.

Frage 156

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

Frage 157

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

Frage 158

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

Frage 159

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

Frage 160

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

Frage 161

Frage
Which statement about PROC SQL is false?
Antworten
  • 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

Frage 162

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

Frage 163

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

Frage 164

Frage
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?
Antworten
  • 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;

Frage 165

Frage
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;
Antworten
  • 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

Frage 166

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

Frage 167

Frage
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;
Antworten
  • FROM
  • WHERE
  • SELECT

Frage 168

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

Frage 169

Frage
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;
Antworten
  • Policy=Policy
  • claims.Policy=accounts.Policy
  • claims.Policy=insurance.Policy
  • insurance.Policy=insurance.Policy

Frage 170

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

Frage 171

Frage
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;
Antworten
  • 0
  • 30
  • 60
  • 900

Frage 172

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

Frage 173

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

Frage 174

Frage
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;
Antworten
  • 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.

Frage 175

Frage
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;
Antworten
  • x
  • x,
  • y
  • y,
  • c

Frage 176

Frage
Which of the following statements about the SAS macro facility are true?
Antworten
  • 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

Frage 177

Frage
Which of the following statements is true about macro variables?
Antworten
  • 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

Frage 178

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

Frage 179

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

Frage 180

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

Frage 181

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

Frage 182

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

Frage 183

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

Frage 184

Frage
What is the benefit of using the SAS macro facility?
Antworten
  • 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

Frage 185

Frage
Which statement correctly defines a SAS macro variable?
Antworten
  • 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.

Frage 186

Frage
Which program correctly references the automatic macro variable SYSDATE?
Antworten
  • 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;

Frage 187

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

Frage 188

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

Frage 189

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

Frage 190

Frage
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?
Antworten
  • Day=sysday;
  • Day=&sysday;
  • Day='&sysday';
  • Day="&sysday";

Frage 191

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

Frage 192

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

Frage 193

Frage
Which of the following lists the steps in the programming process correctly?
Antworten
  • 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.

Frage 194

Frage
Are raw data files created only by SAS?
Antworten
  • Yes
  • No

Frage 195

Frage
Using SAS, you can read many kinds of data.
Antworten
  • True
  • False

Frage 196

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

Frage 197

Frage
Are SAS data sets created only by SAS?
Antworten
  • Yes
  • No

Frage 198

Frage
Can a SAS program be saved and reused?
Antworten
  • Yes
  • No

Frage 199

Frage
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;
Antworten
  • four
  • five
  • six
  • seven

Frage 200

Frage
Which of the following is a SAS syntax requirement?
Antworten
  • 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.
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

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