09-15-2014 05:34 AM
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:
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
Input id $ @;
if id ne ‘ ‘ then input Sex $ 5;
else input age 7-8;
How many records from rawdt file will be read in one iteration after submitting the below code.
D. program fails due to syntax error.
09-15-2014 07:28 AM
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.