Premium

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



Question : You have been given below dataset and program

filename course81 '/folders/myfolders/hedata/course81.txt';

data data81;
infile course81 ;
retain course_name;
input header $ @;
if header='C' then input course_name $;
if header='LF';
input location $ Fee ;
run;

What value it will have in 10th record

 : You have been given below dataset and program
1. SAS LF MUMBAI 4999

2. HADOOP LF MUMBAI 4999

3. Access Mostly Uused Products by 50000+ Subscribers

4. SCALA LF MUMBAI 4999


Correct Answer : Get Lastest Questions and Answer :
Explanation: As you can see in the program, it will read record based on the header. And hold the header for the each detail record, and
generate output for each record. Based on this 10th record will be 14th line of the given dataset.




Question :
You have been given blow dataset and program

filename course81 '/folders/myfolders/hedata/course81.txt';

data data81 (drop=header);
infile course81;
retain course_name;
input header $ @;

if header='C' then
do;

if _N_ >1 then
output;
TOTAL_LOCATIONS=0;
input course_name $;
end;
else if header='LF' then
TOTAL_LOCATIONS+1;
run;

proc print data=data81;
run;

What value the 5th observation will hold?

 :
1. SAS 4

2. HADOOP 4

3. Access Mostly Uused Products by 50000+ Subscribers

4. PYTHON 4

5. None of the above


Correct Answer : Get Lastest Questions and Answer :
Explanation: As you can see in the program each single output is generated for all the detail records. There are in total you can see 5
header record and 5 detail record . 5th header record is PYTHON and total value will be 4. However, we have not stored last record in the output. Hence,
only 4 observation will be generated and 5th one will never be generated.
1 SAS 4
2 HADOOP 4
3 SPARK 1
4 SCALA 4





Question : By looking at the dataset, can you determine which is a correct statement where it finds that as soon as header is C , all the detail
record should be processed?



 : By looking at the dataset, can you determine which is a correct statement where it finds that as soon as header is C , all the detail
1. if header='C' do;

2. if header=C then do;

3. Access Mostly Uused Products by 50000+ Subscribers

4. if header='C' then do;


Correct Answer : Get Lastest Questions and Answer :
Explanation: Yes, you should have used if then statement to find that header value is C or not, if true than process all the detail
records.


Related Questions


Question : You have been given below dataset

Now C represent header record and LF represent detail record, now you want to create one observation per detail record, what do you do?

 : You have been given below dataset
1. We first need to fine which represent header and which record is part of detail in this case C is header and LF is detail record.

2. We need to hold the header record C of each observation until the next header record is read.

3. Access Mostly Uused Products by 50000+ Subscribers

4. All of the above are correct



Question : You have been given below dataset

Which of the blow statement will hold the header value until all the detail records are read

 : You have been given below dataset
1. input header @;

2. input header @@;

3. Access Mostly Uused Products by 50000+ Subscribers

4. input header \;



Question : Which of the following statement read the header and check whether it is equal to C or not if its C then assign course_name value.

 : Which of the following statement read the header and check whether it is equal to C or not if its C then assign course_name value.
1. if header='C' then input course_name $;

2. if header='C' then input course_name $ @;

3. Access Mostly Uused Products by 50000+ Subscribers

4. if header='C' then input course_name $ \;



Question : You have been given below dataset and program

filename course81 '/folders/myfolders/hedata/course81.txt';

data data81;
infile course81 ;
retain course_name;
input header $ @;
if header='C' then input course_name $;
if header='LF';
input location $ Fee ;
run;

What value it will have in 10th record

 : You have been given below dataset and program
1. SAS LF MUMBAI 4999

2. HADOOP LF MUMBAI 4999

3. Access Mostly Uused Products by 50000+ Subscribers

4. SCALA LF MUMBAI 4999



Question :
You have been given blow dataset and program

filename course81 '/folders/myfolders/hedata/course81.txt';

data data81 (drop=header);
infile course81;
retain course_name;
input header $ @;

if header='C' then
do;

if _N_ >1 then
output;
TOTAL_LOCATIONS=0;
input course_name $;
end;
else if header='LF' then
TOTAL_LOCATIONS+1;
run;

proc print data=data81;
run;

What value the 5th observation will hold?

 :
1. SAS 4

2. HADOOP 4

3. Access Mostly Uused Products by 50000+ Subscribers

4. PYTHON 4

5. None of the above



Question : By looking at the dataset, can you determine which is a correct statement where it finds that as soon as header is C , all the detail
record should be processed?



 : By looking at the dataset, can you determine which is a correct statement where it finds that as soon as header is C , all the detail
1. if header='C' do;

2. if header=C then do;

3. Access Mostly Uused Products by 50000+ Subscribers

4. if header='C' then do;