Question : Which of the following statement is correct? 1. When you use PROC PRINT, you need to provide specific variables. As by default it cannot create any report.
2. Using PROC PRINT statement you can print all the ROWS and COLUMNS which exists in dataset. However, you can request more sample data to be extracted if required.
4. PROC PRINT displays all observations and variables in the dataset, a column for observation numbers will be first left. Variable will be printed in the same order in which they are stored with the dataset.
Correct Answer : Get Lastest Questions and Answer : Explanation: When you use PROC PRINT statement it will certainly generate a report if there is any data. First column by default will be ID column and other column will be printed in the order in which it is stored.
Question :
Select the DO WHILE statement that would generate the same result as the program below.
data work.hadoopdata; hadoopprice=100000; do until(hadoopprice gt 500000); Year+1; hadoopprice+(hadoopprice*.10); end; run;
Explanation: Because the DO WHILE loop is evaluated at the top of the loop, you specify the condition that must exist in order to execute the enclosed statements. Do While statement : The expression is evaluated at the top of the loop before the statements in the DO loop are executed. If the expression is true, the DO loop iterates. If the expression is false the first time it is evaluated, the DO loop does not iterate even once.
Question : Which of the following statement correctly creates a fileref allhecrs 1. libname allhecrs '/folders/myfolders/hedata/hecourses2017t.dat';
Correct Answer : Get Lastest Questions and Answer : Explanation: See the following statements for the explanation - LIBNAME -> It reference a SAS library. It is used to refer SAS library. - FILENAME -> It references external file. It is similar to the libref. However, will be used to refer an external file. - DATA -> Give the name to SAS dataset - INFILE -> To identify an external file - INPUT -> It describes the data
Related Questions
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?
1. A NOTE indicating that 1 observation is read. 2. A NOTE indicating that 0 observations were read 3. Access Mostly Uused Products by 50000+ Subscribers 4. An ERROR indicating that the WHERE clause operator requires compatible variables.
1. The SAS log contains an explanation of the error. 2. The DATA step continues to execute and the resulting data set is complete. 3. Access Mostly Uused Products by 50000+ Subscribers 4. A note appears in the SAS log indicating that the incorrect statement was saved to a SAS data set for further examination.