Premium

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



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

Correct Answer : Get Lastest Questions and Answer :
Explanation: Column Input required that each column should have fixed width. Option B does not satisfy this. And it can read only numeric
and character values and cannot read special character like $.




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



Correct Answer : Get Lastest Questions and Answer :
Explanation: As you will be reading rawfile, hence you need to use filename option at first. Hence, option 4 is out. As you can see it is a
fixed width file without column name, hence you need to use and provide column width, which is not the case in 1st option , hence it is out. In option 2
it had used only infile option with filename without the path. Which is not correct you need to provide full path of the file or fileref which points to
the actual file. Hence, option 2 is out. The only option remain is 3rd which is correct.




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


Correct Answer : Get Lastest Questions and Answer :
Explanation: You can use input statement to print fixed width data. However, you need to provide the exact width for each variable. However,
here they want output to be in different order than actual file. The best option is in the input statement put the variable in the order in which they
need to be used. In option 4 it had used variable statement instead of input, hence this is not correct.


Related Questions


Question :

An HTML file contains a SAS report. Which ODS statement option is used to specify the name of the HTML file?

  :
1. OUT=
2. FILE=
3. Access Mostly Uused Products by 50000+ Subscribers
4. HTMLFILE=



Question : The following SAS program is submitted:

data work.test;
set sasuser.class;
array t{3}
(insert text here)
(5, 10, 15);
run;

Which one of the following completes the ARRAY statement and creates data elements that are not included in the SAS data set Work.Test?
  : The following SAS program is submitted:
1. _DROP_
2. _TEMP_
3. Access Mostly Uused Products by 50000+ Subscribers
4. Noextratextisneeded


Question : A raw data file is listed below.

1---+----10---+----20---+---
01/05/1989 Frank 11
12/25/1987 June 13
01/05/1991 Sally 9
The following SAS program is submitted using the raw data file as input:

data work.family;
infile 'file-specification';
input @1 date_of_birth mmddyy10. @15 first_name $5. @25 age 3;
run;

proc print data=work.family noobs;
run;
Which one of the following is the result?

  :	A raw data file is listed below.
1. The program executes, but the age values are missing in the output.
2. The program executes, but the date values are missing in the output.
3. Access Mostly Uused Products by 50000+ Subscribers
4. The program fails to execute because the date informat is coded incorrectly.



Question :Assume that SAS data sets Sasdata.Products and Sasdata.Sales both contain the Prod_ID variable.
Which of the following SAS DATA steps returns only exceptions or non matches?
a.
libname sasdata 'SAS-data-library';
data all;
merge sasdata.products
sasdata.sales;
by prod_id;
if ins=1 or inp=1; run;
b.
libname sasdata 'SAS-data-library';
data all;
merge sasdata.products(in=inp)
sasdata.sales(in=ins);
by prod_id;
if ins=1 and inp=1; run;
c.
libname sasdata 'SAS-data-library';
data all;
merge sasdata.products(in=inp)
sasdata.sales(in=ins);
by prod_id;
if ins=0 and inp=0; run;
d.
libname sasdata 'SAS-data-library';
data all;
merge sasdata.products(in=inp)
sasdata.sales(in=ins);
by prod_id;
if ins=0 or inp=0; run;
  :Assume that SAS data sets Sasdata.Products and Sasdata.Sales both contain the Prod_ID variable.
1. a
2. b
3. Access Mostly Uused Products by 50000+ Subscribers
4. d


Question :

The following SAS program is submitted:

libname sasdata 'SAS-data-library';
libname labdata 'SAS-data-library';
data labdata.boston
labdata.dallas(drop=city dest equipment);
set sasdata.cities(keep=orig dest city
price equipment);
if dest='BOS' then output labdata.boston;
else if dest='DFW' then output labdata.dallas;
run;

Which variables are output to both data sets?
  :
1. price and orig only
2. city and equipment only
3. Access Mostly Uused Products by 50000+ Subscribers
4. city, price, orig, and equipment


Question : The following SAS program is submitted:

proc contents data=sasuser._all_ nods;run;

Which one of the following is produced as output?

  : The following SAS program is submitted:
1. the list of all data set names in the Sasuser library only
2. the descriptor portion of the data set named Sasuser._All_
3. Access Mostly Uused Products by 50000+ Subscribers
4. the list of data set named in the Sasuser library plus the descriptor portion of every data set in the Sasuser library.