Premium

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



Question :

The descriptor and data portions of the Work.Salaries data set are shown below.

Variable Type Len Pos
---------------------
name Char 8 0
salary Char 8 16
status Char 8 8


name status salary
----------------------
Liz S 15,600
Herman S 26,700
Marty S 35,000

The following SAS program is submitted:

proc print data=work.salaries; where 20000 > salary;run;

What is displayed in the SAS log after the program is executed?


  :
1. A NOTE indicating that 1 observation is read.
2. A NOTE indicating that 0 observations were read
3. Access Mostly Uused Products by 50000+ Subscribers
4. An ERROR indicating that the WHERE clause operator requires compatible variables.

Correct Answer : Get Lastest Questions and Answer :

Exp: Salary is defined as a character variable. Therefore, the value in the WHERE statement
must be the character value 20,000 enclosed in quotation marks.

salary is char form, if not, "" can convert their own, can do no wrong




Question :

Which of the following statements is true when SAS encounters a syntax error in a DATA step?

  :
1. The SAS log contains an explanation of the error.
2. The DATA step continues to execute and the resulting data set is complete.
3. Access Mostly Uused Products by 50000+ Subscribers
4. A note appears in the SAS log indicating that the incorrect statement was saved to a SAS data set for further examination.


Correct Answer : Get Lastest Questions and Answer :


Explanation: SAS scans the DATA step for syntax errors during the compilation phase. If there are syntax errors, those errors get written to the log. Most syntax errors prevent further
processing of the DATA step.




Question :

Which TITLE statement would display JANE'S DOG as the text of the title?


  :
1. title "JANE"S DOG";
2. title 'JANE"S DOG';
3. Access Mostly Uused Products by 50000+ Subscribers
4. title 'JANE' ' 'S DOG';


Correct Answer : Get Lastest Questions and Answer :

Explanation: The title in a TITLE statement must be enclosed in a pair of matched quotation marks. Unbalanced quotation marks can cause problems for SAS. To hide an unmatched single
quotation mark, surround the title text with matched double quotation marks.


Related Questions


Question : Which of the following statement is correct?
 : Which of the following statement is correct?
1. When you use PROC PRINT, you need to provide specific variables. As by default it cannot create any report.

2. Using PROC PRINT statement you can print all the ROWS and COLUMNS which exists in dataset. However, you can request more sample data
to be extracted if required.

3. Access Mostly Uused Products by 50000+ Subscribers

4. PROC PRINT displays all observations and variables in the dataset, a column for observation numbers will be first left. Variable
will be printed in the same order in which they are stored with the dataset.



Question :

Select the DO WHILE statement that would generate the same result as the program below.

data work.hadoopdata;
hadoopprice=100000;
do until(hadoopprice gt 500000);
Year+1;
hadoopprice+(hadoopprice*.10);
end;
run;

 :
1. do while(hadoopprice ge 500000);
2. do while(hadoopprice=500000);
3. Access Mostly Uused Products by 50000+ Subscribers
4. do while(hadoopprice>500000);


Question : Which of the following statement correctly creates a fileref allhecrs
 : Which of the following statement correctly creates a fileref allhecrs
1. libname allhecrs '/folders/myfolders/hedata/hecourses2017t.dat';

2. file allhecrs '/folders/myfolders/hedata/hecourses2017t.dat';

3. Access Mostly Uused Products by 50000+ Subscribers

4. filename allhecrs '/folders/myfolders/hedata/hecourses2017t.dat';



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;