Premium

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



Question : You have created a filref as below. Till when this fileref will be available
filename allhecrs '/folders/myfolders/hedata/hecourses2017t.dat';

A. If you update this, it will be changed
B. If you clear this
C. You closed your session

 : You have created a filref as below. Till when this fileref will be available
1. A,B
2. B,C
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,B,C

Correct Answer : Get Lastest Questions and Answer :
Explanation: fileref and libref will have the same scope. As soon as you update it, clear it or close the session they will be removed and
you have to create again.




Question : You have created a fileref as below, now you want to use this fileref and restrict the dataset to be upto first records. Which of the
following statement you will be using for this given requirement?
filename allhecrs '/folders/myfolders/hedata/hecourses2017t.dat';

 : You have created a fileref as below, now you want to use this fileref and restrict the dataset to be upto first  records. Which of the
1. infile allhecrs obs 15;

2. infile allhecrs obs=15;

3. Access Mostly Uused Products by 50000+ Subscribers

4. input allhecrs obs 15;


Correct Answer : Get Lastest Questions and Answer :
Explanation: You can use fileref in the infile statement to read the data. However, you can use direct file path as well instead of fileref.
Using obs=15 will restrict to read observation from 1 to 15.




Question : You have been given below SAS dataset named work.hadoopexam


Now you need to write this dataset to a raw file on UNIX platform, how can you do that?

 : You have been given below SAS dataset named work.hadoopexam
1. data _null_;
set work.hadoopexam;
file "/folders/myfolders/hedata/filtered.dat";
put COURSE_ID COURSE_NAME LOCATION$ FEE DATE ;
run;

2. data hetrain.hadoopexam;
set work.hadoopexam;
file "/folders/myfolders/hedata/filtered.dat";
put COURSE_ID COURSE_NAME LOCATION$ FEE DATE ;
run;

3. Access Mostly Uused Products by 50000+ Subscribers
set work.hadoopexam;
infile "/folders/myfolders/hedata/filtered.dat";
put COURSE_ID COURSE_NAME LOCATION$ FEE DATE ;
run;

4. data _null_;
set work.hadoopexam;
file "/folders/myfolders/hedata/filtered.dat";
put COURSE_ID COURSE_NAME LOCATION$ FEE DATE ;
run;


Correct Answer : Get Lastest Questions and Answer :
Explanation: Creating a raw file using SAS RAW DATASET is given below.
_NULL_: It means you are avoiding to create a new SAS dataset. We just want to create a new data file.
PUT: It will help you select columns from the existing source dataset in this case work.course2017.
FILE PRINT : This option help you to print the contents in the file.



Related Questions


Question : The following SAS program is submitted:

data test;
input animal1 $ animal2 $ mlgrams1 mlgrams2;
cards;
hummingbird ostrich 54000.39 90800000.87;
run;
Which one of the following represents the values of each variable in the output data set?
  : The following SAS program is submitted:
1. animal1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000
2. animal1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000.87
3. Access Mostly Uused Products by 50000+ Subscribers
hummingbird ostrich 54000.39 90800000
4. animal1 animal2 mlgrams1 mlgrams2
hummingbird ostrich 54000.39 90800000.87


Question :The SAS data sets Work.Employee and Work.Salary are shown below.

Work.Employee
fname age
Bruce 30
Dan 40

Work.Salary
fname salary
Bruce 25000
Bruce 35000
Dan 25000
The following merged SAS data set is generated:

Work.Empdata
fname age totsal
Bruce 30 60000
Dan 40 25000
Which one of the following SAS programs created the merged data set?
a. data work.empdata;
merge work.employee
work.salary; by fname; if first.fname then totsal=0;
totsal+salary; if last.fname then output; run;
b. data work.empdata(drop=salary);
merge work.employee
work.salary; by fname;
if first.fname then totsal=0; totsal+salary; if last.fname then output; run;
c. data work.empdata; merge work.employee
work.salary(drop=salary);
by fname; if first.fname then total=0; totsal+salary; if last.fname then output; run;
d. data work.empdata; merge work.employee
work.salary; by fname; if first.fname then total+salary; run;
  :The SAS data sets Work.Employee and Work.Salary are shown below.
1. a
2. b
3. Access Mostly Uused Products by 50000+ Subscribers
4. d


Question :
name age
Janice 10
Henri 11
Michele 11
Susan 12
The following SAS program is submitted using the Sasdata.Group data set as input:

libname sasdata 'SAS-data-library';
data group;
set sasdata.group;
file 'file-specification';
put name $15. @5 age 2.;
run;

Which one of the following describes the output created?
  :
1. a raw data file only
2. a SAS data set named Group only
3. Access Mostly Uused Products by 50000+ Subscribers
4. The program fails execution due to errors.


Question :

The SAS data set Employee_info is listed below.

employee bonus
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:

proc sort data=employee_info;
(insert BY statement here)
run;

Which one of the following BY statements completes the program and sorts the data in sequential order bydescending bonus values within ascending employee values?


  :
1. by descending bonus employee;
2. by employee bonus descending;
3. Access Mostly Uused Products by 50000+ Subscribers
4. by descending employee bonus;


Question :

Assume the SAS data set Sasuser.Houses has four numeric variables.
The following SAS program is submitted:

proc means data=sasuser.houses mean;
(insert statement(s) here)run;
The following report is produced:
Which of the following statement(s) create(s) this report?
  :
1. class style;
2. var bedrooms baths;
3. Access Mostly Uused Products by 50000+ Subscribers
var bedrooms baths;
4. . var style;
class bedrooms baths;


Question :

The following SAS program is submitted:

data work.accounting; length jobcode $ 12; set work.department;run;

The Work.Department SAS data set contains a character variable named jobcode with a length of 5. Which of the following is the length of the variable jobcode in the output data set?
  :
1. 5
2. 8
3. Access Mostly Uused Products by 50000+ Subscribers
4. The value cannot be determined because the program fails to execute due to syntax errors.