Premium

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



Question : You have been given below program

data PREDICTED (drop=WEIGHT index );
set User ;
array month_{6} xxxx (1,2,3,4,5,6) ;
array weigh_{6} ;
EXISTING_WEIGHT=WEIGHT;
do index=1 to dim(month_);

put _all_;
weigh_{index}=month_{index}+WEIGHT+WEIGHT*.02;
WEIGHT=weigh_{index}

end;
run;

proc print data=PREDICTED;run;

What value you will put in place of xxxx , so that all month_ variable become temporary and will not be part of output?

 : You have been given below program
1. _temporary_

2. temporary

3. Access Mostly Uused Products by 50000+ Subscribers

4. missing

5. blank space


Correct Answer : Get Lastest Questions and Answer :
Explanation: If you want that all the variables created by an array to be temporary and you dont need them after program execution, you can
use _temporary_ keyword after array declaration.




Question : You have been given below dataset



Which of the following will correctly read the files.

 : You have been given below dataset
1. input ID $1-3 IDnum $4-11 @13 Fee comma8. LOCATION $ 22-35;

2. input ID 1-3 $ IDnum 4-11 $ @13 Fee comma8. LOCATION 22-35 $;

3. Access Mostly Uused Products by 50000+ Subscribers

4. input ID 1-3 IDnum 4-11 @13 Fee comma8. LOCATION 22-35;



Correct Answer : Get Lastest Questions and Answer :
Explanation: As you can see given data needs to be read with the fixed column width. There are mixed of values numeric as well as character.
Whenever you need to read character values, you have to use $ sign. So you can clearly remove option 4 and its not correct. Now you need to make sure
that $ sign should be just after variable name and then width of the variable. Hence, option 2 and 3 is also out. Only correct answer is 1st one.




Question : You have been given some data in a text file at below location and you tried to read it is using SAS column input.
filename course22 '/folders/myfolders/hedata/course22.txt;

Which of the following statements are correct with regards to column input?

A. If your datasets column has blank spaces than it can be read using column input.
B. If data is missing than it is not mandatory to have placeholder.
C. You can read either standard or non-standard values
D. It is not necessary that data stored in course22.txt file should be separated by either comma or space.

 : You have been given some data in a text file at below location and you tried to read it is using SAS column input.
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 column input to read data than your data can have blank space, but can be read successfully. For missing data
there is no need to have place holder they will be marked as missing in case of numeric as . and in case of character it would be a blank space. You
should use column input only to read standard values. As column input can read data based on column position so it is not required that you have blank
space or any other delimiter for the data.


Related Questions


Question :

The contents of the SAS data set PERM.JAN_SALES are listed below:
VARIABLE NAME TYPE
idnum character variable
sales_date numeric date value
A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in
a MMDDYY10 form.
Which one of the following SAS DATA steps correctly creates this raw data file?

 :
1. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification' dsd = ',';
put idnum sales_date : mmddyy10.;
run;
2. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification' dlm = ',';
put idnum sales_date : mmddyy10.;
run;
3. Access Mostly Uused Products by 50000+ Subscribers
data _null_;
set perm.jan_sales;
file 'file-specification';
put idnum sales_date : mmddyy10. dlm = ',';
run;
4. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification';
put idnum sales_date : mmddyy10. dsd = ',';
run;


Question : A raw data record is shown below:
07Jan2002
Which one of the following informats would read this value and store it as a SAS date value?
 : A raw data record is shown below:
1. date9
2. ddmonyy9
3. Access Mostly Uused Products by 50000+ Subscribers
4. ddmmmyyyy9


Question : The following SAS program is submitted:
libname temp 'SAS-data-library';
data work.new;
set temp.jobs;
format newdate mmddyy10.;
qdate = qtr(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new;
run;
The variable NEWDATE contains the SAS date value for April 15, 2000.
What output is produced if April 15, 2000 falls on a Saturday?
 : The following SAS program is submitted:
1. Obs newdate qdate ddate
1 APR152000 2 6
2. Obs newdate qdate ddate
1 04/15/2000 2 6
3. Access Mostly Uused Products by 50000+ Subscribers
1 APR152000 2 7
4. Obs newdate qdate ddate
1 04/15/2000 2 7


Question : The following SAS program is submitted:
data work.report;
set work.sales_info;
if qtr(sales_date) ge 3;
run;
The SAS data set WORK.SALES_INFO has one observation for each month in the year 2000 and the variable SALES_DATE which
contains a SAS date value for each of the twelve months.
How many of the original twelve observations in WORK.SALES_INFO are written to the WORK.REPORT data set?
 : The following SAS program is submitted:
1. 2
2. 3
3. Access Mostly Uused Products by 50000+ Subscribers
4. 9


Question : The following SAS program is submitted:
data revenue;
set year_1;
var1 = mdy(1,15,1960);
run;
Which one of the following values does the variable named VAR1 contain?
 : The following SAS program is submitted:
1. 14
2. 15
3. Access Mostly Uused Products by 50000+ Subscribers
4. '1/15/1960'


Question : The following SAS program is submitted:
data work.new;
mon = 3;
day = 23;
year = 2000;
date = mdy(mon,day,year);
run;
Which one of the following is the value of the DATE variable?
 : The following SAS program is submitted:
1. a character string with the value '23mar2000'
2. a character string with the value '03/23/2000'
3. Access Mostly Uused Products by 50000+ Subscribers
4. a numeric value of 3232000, which represents the SAS date value for March 23, 2000