Premium

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



Question :

The contents of two SAS data sets named EMPLOYEE and SALARY
are listed below. How many observation are in EMPLSAL dataset

data emplsal;
merge employee (in=ine) salary(in=ins);
by name;
if ine and ins;
run;
Choices are



  :
1. 4
2. 3
3. Access Mostly Uused Products by 50000+ Subscribers
4. 1


Correct Answer : Get Lastest Questions and Answer :

Explanation: Bruce 30 40000
Bruce 30 35000
Dan 35 37000
Dan 35
data work.ds1;
merge work.ds2 (in=X) work.ds3 (in=Y);
by id;

1. When in=X and in=Y --> Exact merge. The data set is appended without any condition.

2. Only in=X --> Left inner merge. All the observations in ds2 and those common to ds2 and ds3 are merged. Rest are ignored.

3. Access Mostly Uused Products by 50000+ Subscribers

4. in=0 and in = Y -->Right outer merge. Only the observations in ds3 are merged.

5. in = X and in=0 --> Left outer merge. Only the observations on d2 are merged.






Question :
Which of the following will occur when an EC2 instance in a VPC (Virtual Private Cloud) with an associated Elastic IP is stopped and started?

  :
1. The Elastic IP will be dissociated from the instance
2. All data on instance-store devices will be lost
3. Access Mostly Uused Products by 50000+ Subscribers
4. The underlying host for the instance is changed

Correct Answer : Get Lastest Questions and Answer
:

Explanation:





Question :

The following SAS program is submitted:
data numrecords;
infile 'file-specification';
input @1 patient $15.
relative $ 16-26 @;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step during execution?


  :
1. 1
2. 2
3. Access Mostly Uused Products by 50000+ Subscribers
4. 4

Correct Answer : Get Lastest Questions and Answer :

Explanation: As each input statement other than last (input age) ends with @, SAS will not advance to next raw data record. Only after age is read, SAS will finish the datastep iteration
and read next record.

For example in case below, in there are two data step iteration and during each iteration it read one raw data record from raw data (datalines). So answer is A.

data a;
input age @;
if age > 80 then input bp @;
input gluco;
datalines;
81 220 110
50 125
;
run;




Related Questions


Question : You have been given below dataset

Which of the following is a correct SAS program which can generate output as Course100?

 : You have been given below dataset
1. data course100;
set course101 ;
set course102 ;
run;


2. data course100;
set course101 set course102 ;
run;


3. Access Mostly Uused Products by 50000+ Subscribers
set course101 course102 ;
by COURSE_ID;
run;


4. data course100;
merge course101 course102 ;
by COURSE_ID;
run;



Question : You have been given below dataset

You execute below program, which of the generated output is correct?
data course100;
set course101 course102;
run;


 : You have been given below dataset
1. Image1
2. Image2
3. Access Mostly Uused Products by 50000+ Subscribers
4. Image4


Question : You have been given below two datasets

And you have below program
data course100;
set course101 course102;
run;

What will be the value of the fee in 2nd observation when program executed?

 : You have been given below two datasets
1. 6500

2. Null

3. Access Mostly Uused Products by 50000+ Subscribers

4. 5000



Question : You have been given below two datasets


And you apply below program
data course100;
merge course101 course102 ;
by COURSE_ID;
run;

Which of the following statement is correct?

 : You have been given below two datasets
1. For all the same course_id LOCATION value of the first data set course101 will remain as it is and Location from Course102 will be
discarded.

2. For the same course_id , merged data set course100 will have missing LOCATION.

3. Access Mostly Uused Products by 50000+ Subscribers

4. Value of all the common columns for which course_id matches will be unpredictable.



Question : You have been given below dataset and program


data course100;
merge course101 (in=in_first rename=(DATE=TRAINING_DATE))
course102 (in=in_second rename=(DATE=REGISTRATION_DATE)) ;
by COURSE_ID;
if in_first=1 and in_second=1;
run;

Which of the following is a correct output?


 : You have been given below dataset and program
1.
Image1
2.
Image2
3. Access Mostly Uused Products by 50000+ Subscribers
Image3
4. None of the above



Question : You have two datasets Course and Course both have the Fee column variables. However, you dont want that Fee column from first
dataset will be overwritten during match merge. How can you avoid that, select the correct SAS program?

 : You have two datasets Course and Course both have the Fee column variables. However, you dont want that Fee column from first
1. data course100;
merge course101 (in=FirstFee)
course102 ;
by COURSE_ID;
if in_first=1 and in_second=1;
run;


2. data course100;
merge course101 (rename=(FEE=TRAINING_FEE))
course102 (rename=(FEE=REGISTRATION_FEE)) ;
by COURSE_ID;
run;


3. Access Mostly Uused Products by 50000+ Subscribers
merge course101 (out=(FEE=TRAINING_FEE))
course102 (out=(FEE=REGISTRATION_FEE)) ;
by COURSE_ID;
run;


4. Both 2 and 3 are correct