Premium

Base SAS Certified Associate: Programming Fundamentals Using SAS Questions and Answers (Dumps and Practice 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;

Correct Answer : Get Lastest Questions and Answer :

Exp: First, in put statement, $ sign for character variable, Idnum is not needed.
The correct answer is: 2
Ans, 1 is not correct as the default delimeter (,) for DSD is defined as dsd = ','. It is correct if it was used as: DSD
Ans 3 and 4 are not correct because of using the options dlm and dsd in PUT statement. They are the INFILE options.





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

Correct Answer : Get Lastest Questions and Answer :

Exp: the only corerct DATE INFORMATS are:

MMDDYY8. reads dates written as mm/dd/yy.

MMDDYY10. reads dates written as mm/dd/yyyy.

DATE7. reads dates in the form ddMMMyy.

DATE9. reads dates in the form ddMMMyyyy




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

Correct Answer : Get Lastest Questions and Answer :
Exp: The QTR function returns a value of 1, 2, 3, or 4 from a SAS date value to indicate the quarter of the year in which a date value falls.

Value Day of the Week
1 Sunday
2 Monday
3 Tuesday
4 Wednesday
5 Thursday
6 Friday
7 Saturday


Related Questions


Question : Select the correct statement which is not an advantage of column input, while Reading Raw Data with the INPUT Statement?

  : Select the correct statement which is not an advantage of column input, while Reading Raw Data with the INPUT Statement?
1. It can be used to read character variables that contain embedded blanks
2. No placeholder is required for missing data.
3. Access Mostly Uused Products by 50000+ Subscribers
4. Fields do not have to be separated by blanks or other delimiters


Question : Which of the following program correctly reads the instream data


 : Which of the following program correctly reads the instream data
1. A
2. B
3. Access Mostly Uused Products by 50000+ Subscribers


Question : You have been given below dataset

You need to process the dataset which has either MUMBAI or AHMEDABAD as a location and fee is higher than 500, which of the following statement is
correct for this?

 : You have been given below dataset
1. if fee=5000 and location NOT in ('MUMBAI' ,'AHMEDABAD');

2. if fee>=5000 and location AND ('MUMBAI' ,'AHMEDABAD');

3. Access Mostly Uused Products by 50000+ Subscribers

4. if fee>5000 OR location OR ('MUMBAI' ,'AHMEDABAD');



Question : As you know, SAS Data step is executed in two phase compilation and execution phase. During each phase some variables values are assigned
or created. Which of the following will not be created in compilation phase?

 : As you know, SAS Data step is executed in two phase compilation and execution phase. During each phase some variables values are assigned
1. Descriptor of the dataset

2. First observation will be created in compilation phase

3. Access Mostly Uused Products by 50000+ Subscribers

4. _N_ automatic variable will be created

5. _ERROR_ automatic variable will be created



Question : You have written a SAS program, one of your colleague told you that this program will not be compiled successfully, it has compilation
error, and what does he mean?
A. Values provided in if condition are wrong.
B. Values provided in where clause are wrong.
C. You have used one of the options in the DATA step, which is not valid
D. You have missed the semicolon at the end of statement
E. You have used the SAS keywords which are misspelled

 : You have written a SAS program, one of your colleague told you that this program will not be compiled successfully, it has compilation
1. A,B,C
2. B,C,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,D,E
5. A,C,E


Question : You have been running a DATA step on a raw file which contain records in it, while execution phase how many time DATA step will be
executed


 : You have been running a DATA step on a raw file which contain  records in it, while execution phase how many time DATA step will be
1. Only once for entire file

2. It cannot be predicted, because it depend on the file size and what is the input buffer size is configured.

3. Access Mostly Uused Products by 50000+ Subscribers

4. It can be 50 times , if buffer is configured with 1 MB