Premium

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



Question : You are planning to use commaw.d informat, which of the following data can be read using this format?

A. 9,99
B. $99.9
C. %99.9

 : You are planning to use commaw.d informat, which of the following data can be read using this format?
1. A,B,C
2. B,C,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,B,D

Correct Answer : Get Lastest Questions and Answer :
Explanation: When you use commaw.d format, it not only remove commas from the data, but also it can remove some special character like comm,
%, $ ect. And only numeric value will be stored by SAS.




Question : You have been given below dataset


Which of the following is correct statement to read data as course_name and Fee, both value should be read as character

 : You have been given below dataset
1. Input +1 FEE $9 . @1 COURSE_NAME $8.

2. Input +6 FEE $9 . @1 COURSE_NAME $5.

3. Access Mostly Uused Products by 50000+ Subscribers

4. Input @9 FEE $9 @1 COURSE_NAME $8.


Correct Answer : Get Lastest Questions and Answer :
Explanation: As per given option all the values needs to be read as character than we can say that we have to use $ sign as well for width
w. In given option course_name start at column 1 . Hence, it can use column pointer @1 next width of the column is 8. Hence, $8. Is correct. Next Fee
which is actually a numeric value, but we have been asked to read it as a character. Hence, again it starts 1 column after the course_name , so you can
use +1 as well as you can define width of the Fee column which is 9 character including , and $ sign. Hence, it will be $9.




Question : You have been given below dataset


Which of the following will correctly read column Fee as a numeric value ?

 : You have been given below dataset
1. Input @11 FEE $9;

2. Input @11 Fee 9.2.;

3. Access Mostly Uused Products by 50000+ Subscribers

4. Input @11 FEE comma9.2.;


Correct Answer : Get Lastest Questions and Answer :
Explanation: As in given data , we can see it is numeric values are given. However, numeric values contain special character like , and $
sign, which can be stripped out by using commaw.d option. Hence, here we will be using option comma9.2. where field w will tell you the total width of
the column in this case it is 9 and decimal places using with the .d part, in this case 2 columns. Hence, 9.2 is correct width and we should use
comma9.2 so all the special character can also be removed.


Related Questions


Question : The following SAS program is submitted:

proc sort data = work.employee;
by descending fname;
proc sort data = work.salary;
by descending fname;

data work.empdata;
merge work.employee
work.salary;
by fname;
run;

Why does the program rail to execute?

 : The following SAS program is submitted:
1. The SORT procedures contain invalid syntax.
2. The merged data sets are not permanent SAS data sets.
3. Access Mostly Uused Products by 50000+ Subscribers
4. The data sets were not merged in the order by which they were sorted.


Question : The following SAS program is submitted:
data work.sales;
do year = 1 to 5;
do month = 1 to 12;
x + 1;
end;
end;
run;
Which one of the following represents how many observations are written to the WORK.SALES data set?

 : The following SAS program is submitted:
1. 0
2. 1
3. Access Mostly Uused Products by 50000+ Subscribers
4. 60


Question : Given the following raw data record:
----|----10---|----20---|----30
son Travis,
The following output is desired:
Obs relation firstname
1 son Travis
Which SAS program correctly reads in the raw data?


 : Given the following raw data record:
1. data family ( dIm = `,'); infile `tile specification'; input relation $ firstname $; run;
2. options dIm = `,'; data family; infile `file specification'; input relation $ firstname $; run;
3. Access Mostly Uused Products by 50000+ Subscribers
4. data family; infile `file specification'; input relation $ firstname $ / dim = `,'; run;


Question : Given the SAS data set AGES:
AGES
AGE
---------
The variable AGE contains character values. The following SAS program is submitted:

data subset;
set ages;
where age> 12;
run;

How many observations are written out to the data set SUBSET?

 : Given the SAS data set AGES:
1. 0
2. 1
3. Access Mostly Uused Products by 50000+ Subscribers
4. 3


Question :
---+----10---+----20---+
son Frank 01/31/89
daughter June 12-25-87
brother Samuel 01/17/51

The following program is submitted using this file as input:

data work.family;
infile 'file-specification';
(insert INPUT statement here)
run;

Which INPUT statement correctly reads the values for the variable Birthdate as SAS date values?
 :
1. input relation $ first_name $ birthdate date9.;
2. input relation $ first_name $ birthdate mmddyy8.;
3. Access Mostly Uused Products by 50000+ Subscribers
4. input relation $ first_name $ birthdate : mmddyy8.;


Question :
1---+----10---+----20---+
Jose,47,210
Sue,,108
The following program is submitted using the raw data file above as input:

data employeestats;
(insert INFILE statement here)
input name $ age weight;
run;
The following output is desired:

name age weightJose 47 210Sue . 108

Which of the following INFILE statement completes the program and accesses the data correctly?


  :
1. infile 'file-specification' pad;
2. infile 'file-specification' dsd;
3. Access Mostly Uused Products by 50000+ Subscribers
4. infile 'file-specification' missover;