Need Answers.............

Reply
Occasional Contributor
Posts: 8

Need Answers.............

1.What does the following SAS statement do?

if location =: ‘C';

A. It selects the observation if there is a ‘C’ in the location value.

B. It selects the observation if there is a ‘C’ at the first position in the location value.

C. It selects the observation if the location value is ‘C’.

D. It selects the observation if the location value contains a lowercase ‘c’.

E. None of the above, it’s a typo.

2.The double trailing “@@” in an input statement…(Choose all that apply)

A. holds the current data line in the buffer for another input statement to process

B. can be used to read multiple observations from a single data line

C. loads a new record into the input buffer if an end-of-record is found in the current record

D. is a syntax error.

E. None of the above.

3.Given the contents of the raw data file TYPECOLOR.DAT:

----+----10---+----20---+----30

daisyyellow

The following SAS program is submitted: data FLOWERS; infile 'TYPECOLOR.DAT' truncover; length Type $ 5 Color $ 11; input Type $ Color $;run; What are the values of the variables Type and Color? Options:


1. Type=daisy, Color=yellow
2. Type=daisy, Color=w
3. Type=daisy, Color=daisyyellow
4. Type=daisy, Color=

4.The below code is submitted

Data abc;

Infile rawdt;

Input id $ @;

if id ne ‘ ‘ then input Sex $ 5;

else input age 7-8;

input numrecs;

run;

How many records from rawdt file will be read in one iteration after submitting the below code.

A. 0

B. 1

C. 2

D. program fails due to syntax error.

Thanks..............

Super Contributor
Posts: 308

Re: Need Answers.............

1-B

2- A, B, C

3- 4

4 - C

Super User
Super User
Posts: 7,711

Re: Need Answers.............

It looks like these are test questions from book/exam and hence should be answered by the individual not really posted here.

Super User
Posts: 5,383

Re: Need Answers.............

Agree. And it's annoying that it seems that the persons that ask these question quite often didn't even try to understand the question, or try to test the different alternatives themselves.

The forums are for experience and knowledge exchange, yes. But being served correct answers upfront is a lousy learning technique.

Data never sleeps
Occasional Contributor
Posts: 16

Re: Need Answers.............

2- A, B, C

3- 3

4- C

Ask a Question
Discussion stats
  • 4 replies
  • 739 views
  • 2 likes
  • 5 in conversation