SAS_Institute
A00-201 · Question #18
A raw data record is listed below: ----|----10----|----20----|----30 Printing 750 The following SAS program is submitted: data bonus; infile 'file-specification'; input dept $ 1 - 11 number 13 - 15…
The correct answer is C. department = trim(dept) || put(number,3.). See the full explanation below for the reasoning.
Question
A raw data record is listed below:
----|----10----|----20----|----30
Printing 750
The following SAS program is submitted:
data bonus;
infile 'file-specification';
input dept $ 1 - 11 number 13 - 15;
<insert code here>
run;
Which one of the following SAS statements completes the program and results in a value of
'Printing750' for the DEPARTMENT variable?
Options
- Adepartment = trim(dept) || number;
- Bdepartment = dept || input(number,3.);
- Cdepartment = trim(dept) || put(number,3.);
- Ddepartment = input(dept,11.) || input(number,3.);
How the community answered
(35 responses)- A3% (1)
- B11% (4)
- C77% (27)
- D9% (3)
Community Discussion
No community discussion yet for this question.