Premium

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



Question :

The following SAS program is submitted:
proc datasets lib = sasuser;
contents data = class varnum;
quit;
Which one of the following is the purpose of the VARNUM option?

 :
1. to print a list of variable names
2. to print the total number of variables
3. Access Mostly Uused Products by 50000+ Subscribers
4. to print a list of the variables in the order they were created

Correct Answer : Get Lastest Questions and Answer :

VARNUM: Print a list of the variables by their logical position in the data set. Without varnum, proc contents will print the variables in alphabetic order. varnum makes proc
contents to print the variables in the order they were created. VARNUM returns the variables logical position in the dataset from when it was created in comparison to the others.
By default the output in descriptor information is in the way as to create variables in alphabatical order if u want ur variables to be in the order in which they were used in input
statement in data set varnum is be used





Question :

The following SAS program is submitted:
proc contents data = sasuser.airplanes;
run;
Which one of the following is produced as output?

 :
1. the data portion of every data set in the SASUSER library
2. the data portion of the data set SASUSER.AIRPLANES only
3. Access Mostly Uused Products by 50000+ Subscribers
4. the descriptor portion of the data set SASUSER.AIRPLANES only

Correct Answer : Get Lastest Questions and Answer :




Question : A raw data file is listed below:

--------10-------20-------30
John McCloskey 35 71
June Rosesette 10 43
Tineke Jones 9 37
The following SAS program is submitted using the raw data file as input:
data work.homework;
infile 'file-specification';
input name $ age height;
if age LE 10;
run;
How many observations will the WORK.HOMEWORK data set contain?

 : A raw data file is listed below:
1. 0
2. 2
3. Access Mostly Uused Products by 50000+ Subscribers
4. No data set is created as the program fails to execute due to errors.


Correct Answer : Get Lastest Questions and Answer :

Name variable has first name and last name.
In input we had only name $ and no line pointer therefore it takes the first name as name and takes the family name as age, but family name is character variable it will be looking
numeric value therefore it treats as missing variable then as height it will take 35 in the first observation
Results is as follows inspite of error message in log.

Obs name age height
1 John . 35
2 June . 10
3 Tineke . 9

Numeric missing values are treated as extremely small negative numbers.



Related 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


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;



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;



Question : You have been given below datasets


Which of the above can be correctly read using Column Input format?

 : You have been given below  datasets
1. Image1
2. Image2
3. Access Mostly Uused Products by 50000+ Subscribers


Question : You have been given below raw data at دfolders/myfolders/hedata/wrongdata.dat

Which of the following program can generate output as below.

A.
filename allhecrs '/folders/myfolders/hedata/wrongdata.dat';
data course2017;
infile allhecrs;
input COURSE_ID COURSE_NAME$ LOCATION$ FEE ;
run;
proc print data=course2017;
run;

B.

filename allhecrs '/folders/myfolders/hedata/wrongdata.dat';
data course2017;
infile wrongdata.dat;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35;
run;
proc print data=course2017;
run;

C.
filename allhecrs '/folders/myfolders/hedata/wrongdata.dat';
data course2017;
infile allhecrs;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35;
run;
proc print data=course2017;
run;

D.
libname allhecrs '/folders/myfolders/hedata/wrongdata.dat';
data course2017;
infile allhecrs;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35;
run;
proc print data=course2017;
run;


 : You have been given below raw data at دfolders/myfolders/hedata/wrongdata.dat
1. A


2. B


3. Access Mostly Uused Products by 50000+ Subscribers



4. D




Question : You have been given below raw data at دfolders/myfolders/hedata/wrongdata.dat

Where column widths are like that
COURSE_ID 1 to 3
COURSE_NAME 5 to 20
LOCATION 22 to 30
FEE 32-35
DATE 36-47

Which of the following program will generate output like this.

A.
data course2017;
infile allhecrs;
input COURSE_NAME$ LOCATION$ COURSE_ID FEE DATE date10.;
run;
proc print data=course2017;
run;

B.
data course2017;
infile allhecrs;
input COURSE_NAME$ 5-20 LOCATION$ 22-30 COURSE_ID 1-3 FEE 32-35 DATE date10. 36-47;
run;
proc print data=course2017;
run;

C.
data course2017;
infile allhecrs;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE date10. 36-47;
run;
proc print data=course2017;
run;

D.
data course2017;
infile allhecrs;
variable COURSE_NAME$ 5-20 LOCATION$ 22-30 COURSE_ID 1-3 FEE 32-35 DATE date10. 36-47;
run;
proc print data=course2017;
run;


 : You have been given below raw data at دfolders/myfolders/hedata/wrongdata.dat
1. A


2. B


3. Access Mostly Uused Products by 50000+ Subscribers


4. D