Question Which of the following permanently associates a format with a variable? 1. the FORMAT procedure 2. a FORMAT statement in a DATA step 3. Access Mostly Uused Products by 50000+ Subscribers 4. an INPUT statement with formatted style input Ans :2 Exp : To permanently associate a format with a variable, you use the FORMAT statement in a DATA step. You can use the FORMAT procedure to create a user-defined format. You use the INPUT function to convert character data values to numeric values with an informat. You use the INPUT statement to read data into a data set with an informat.
Question The following report is generated:
Style of homes n Asking Price ---------------------------- CONDO 4 $99,313 RANCH 4 $68,575 SPLIT 3 $77,983 TWOSTORY 4 $83,825 Which of the following steps created the report?
1. proc freq data=sasuser.houses; tables style price /nocum; format price dollar10.; label style="Style of homes" price="Asking price"; run; 2. proc print data=sasuser.houses; class style; var price; table style,n price*mean*f=dollar10.; label style="Style of homes" price="Asking price"; run; 3. Access Mostly Uused Products by 50000+ Subscribers class style; var price; format price dollar10.; label style="Style of homes" price="Asking price"; run;
4. proc report data=sasuser.houses nowd headline; column style n price; define style / group "Style of homes"; define price / mean format=dollar8. "Asking price"; run;
Ans :4 Exp : The FREQ procedure cannot create the average asking price. The CLASS statement and the VAR statement are not valid for use with the PRINT procedure. The MEANS procedure output would have both the N statistic and the N Obs statistic since a CLASS statement is used. The REPORT procedure produced the report.
Question A SAS report currently flows over two pages because it is too long to fit within the specified display dimension. Which one of the following actions would change the display dimension so that the report fits on one page? 1. Increase the value of the LINENO option. 2. Decrease the value of the PAGENO option. 3. Access Mostly Uused Products by 50000+ Subscribers 4. Increase the value of the PAGESIZE option. Ans :4 Exp : The PAGESIZE= SAS system option controls the number of lines that compose a page of SAS procedure output. By increasing the number of lines available per page, the report might fit on one page.
Question :
Which one of the following SAS REPORT procedure options controls how column headings are displayed over multiple lines?
Explanation: The SPLIT= option specifies how to split column headings. The SPACE=, LABEL= and BREAK= options are not valid options in PROC REPORT.
Question :
The following SAS program is submitted:
ods html file='newfile.html';proc print data=sasuser.houses;run;proc means data=sasuser.houses;run;proc freq data=sasuser.shoes;run;ods html close;proc print data=sasuser.shoes;run;
Explanation: By default, one HTML file is created for each FILE= option or BODY= option in the ODS HTML statement. The ODS HTML CLOSE statement closes the open HTML file and ends the output capture. The Newfile.html file contains the output from the PRINT, MEANS, and FREQ procedures.
Question :
A frequency report of the variable Jobcode in the Work.Actors data set is listed below.
The following SAS program is submitted:
data work.joblevels; set work.actors; if jobcode in ('Actor I', 'Actor II') then joblevel='Beginner'; ifjobcode='Actor III' then joblevel='Advanced'; else joblevel='Unknown'; run;
Which of the following represents the possible values for the variable joblevel in the Work.Joblevels data set?
Explanation: The DATA step will continue to process those observations that satisfy the condition in the first IF statement Although Joblevel might be set to Beginner for one or more observations, the condition on the second IF statement will evaluate as false, and the ELSE statement will execute and overwrite the value of Joblevel as Unknown.
Note the red if, to meet the first one, will not stop but continue, so that certainly does not meet the second, and so actor1, actor2 full display as unknown
1. The condition is evaluated at the top of the loop, before the enclosed statements are executed. 2. The enclosed statements are always executed at least once. 3. Access Mostly Uused Products by 50000+ Subscribers 4. The DO loop must have a closing END statement.