Premium

Base SAS Certified Associate: Programming Fundamentals Using SAS Questions and Answers (Dumps and Practice 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=


Correct Answer : Get Lastest Questions and Answer :


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;

How many HTML files are created?



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

Correct Answer : Get Lastest Questions and Answer :

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?


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

Correct Answer : Get Lastest Questions and Answer :

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




Related Questions


Question :
You have submitted the following SAS SORT procedure step generates an output data set:

proc sort data = sasuser.employer out = employee;
by style;
run;

In which library is the output data set stored?
 :
1. WORK
2. REPORT
3. Access Mostly Uused Products by 50000+ Subscribers
4. SASUSER


Question :

Which statement is false regarding DO UNTIL statements?

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


Question : Which of the following program will create following output


A. proc print data=hetrain.helr2;
var DATE LOCATION FEE NOOFSTUDENTS;
sum FEE NOOFSTUDENTS;
run;

B. proc print data=hetrain.helr2;
var DATE LOCATION ;
sum FEE NOOFSTUDENTS;
run;

C. proc print data=hetrain.helr2;
var DATE LOCATION FEE ;
sum FEE NOOFSTUDENTS;
run;

 : Which of the following program will create following output
1. A,B
2. B,C
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,B,C


Question : What happens when you run the following program?
proc sort data=work.newcourses;
run;

proc print data=work.newcourses;
var ID COURSENAME FEE;
where Fee=5000;
run;

 : What happens when you run the following program?
1. PROC PRINT Step will run and print the result in sorted order.

2. PROC SORT Step will permanently sort the given data

3. Access Mostly Uused Products by 50000+ Subscribers

4. PROC Sort step will run successfully, PROC PRINT step generates the error.



Question : You will be running below program
proc sort data=hetrain.helr1 out=work.helr2;
by FEE ID ;
run;

proc print data=work.helr2 noobs;
var ID DATE LOCATION FEE ;
sum FEE DATE;
format FEE DOLLAR9.;
label DATE='Start On' LOCATION='Training Venue';
run;



What is the output will be generated


 : You will be running below program
1.
image1

2.
image2
3. Access Mostly Uused Products by 50000+ Subscribers
image3

4.
image4



Question : You have to write a program such that following conditions are met
1. Course fee is less than or equal to $4000
2. The course id is 1 or course name is ٓpark

 : You have to write a program such that following conditions are met
1. where fee <= 4000 and
id=1 or name='Spark';


2. where (fee le 4000 and id=1)
or name='Spark';


3. Access Mostly Uused Products by 50000+ Subscribers
and (id=1 or name eq 'Spark');



4. where fee <= 4000 or id=1
and name='Spark';