Premium

Base SAS Certified Associate: Programming Fundamentals Using SAS Questions and Answers (Dumps and Practice Questions)



Question : Which of the following statement is correct?
 : 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.

3. Access Mostly Uused Products by 50000+ Subscribers

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;

 :
1. do while(hadoopprice ge 500000);
2. do while(hadoopprice=500000);
3. Access Mostly Uused Products by 50000+ Subscribers
4. do while(hadoopprice>500000);

Correct Answer : Get Lastest Questions and Answer :


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
 : Which of the following statement correctly creates a fileref allhecrs
1. libname allhecrs '/folders/myfolders/hedata/hecourses2017t.dat';

2. file allhecrs '/folders/myfolders/hedata/hecourses2017t.dat';

3. Access Mostly Uused Products by 50000+ Subscribers

4. filename 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?
  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?

  Which of the following permanently associates a format with a variable?
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?
  Which of the following permanently associates a format with a variable?
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?


  Which of the following permanently associates a format with a variable?
1. SPACE=
2. SPLIT=
3. Access Mostly Uused Products by 50000+ Subscribers
4. BREAK=



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;

How many HTML files are created?



 :
1. 1
2. 2
3. Access Mostly Uused Products by 50000+ Subscribers
4. 4


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?


 :
1. Advanced and Unknown only
2. Beginner and Advanced only
3. Access Mostly Uused Products by 50000+ Subscribers
4. " (missing character value)


Question :

The descriptor and data portions of the Work.Salaries data set are shown below.

Variable Type Len Pos
---------------------
name Char 8 0
salary Char 8 16
status Char 8 8


name status salary
----------------------
Liz S 15,600
Herman S 26,700
Marty S 35,000

The following SAS program is submitted:

proc print data=work.salaries; where 20000 > salary;run;

What is displayed in the SAS log after the program is executed?


  :
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.


Question :

Which of the following statements is true when SAS encounters a syntax error in a DATA step?

  :
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.



Question :

Which TITLE statement would display JANE'S DOG as the text of the title?


  :
1. title "JANE"S DOG";
2. title 'JANE"S DOG';
3. Access Mostly Uused Products by 50000+ Subscribers
4. title 'JANE' ' 'S DOG';