🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 11-27-2020 11:35 PM
(1814 views)
The COMMAw.d informat can be used to read which of the following values?
Options:
A. all the three
B. $177.95
C. 12,805
D. 18 %
A or only C? why?
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Poorly worded question. You could use the COMMA informat to read "FRED". The result would be a missing value.
I suspect they want you to answer A as it will read all of those strings as numbers.
But the value it gets for the last one is wrong. The string 18% means the number 0.18 and the COMMA informat will read it as 18 instead.
data test;
input id $ value comma12.;
cards;
B. $177.95
C. 12,805
D. 18 %
;
proc print;
run;
Obs id value 1 B. 177.95 2 C. 12805.00 3 D. 18.00
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Poorly worded question. You could use the COMMA informat to read "FRED". The result would be a missing value.
I suspect they want you to answer A as it will read all of those strings as numbers.
But the value it gets for the last one is wrong. The string 18% means the number 0.18 and the COMMA informat will read it as 18 instead.
data test;
input id $ value comma12.;
cards;
B. $177.95
C. 12,805
D. 18 %
;
proc print;
run;
Obs id value 1 B. 177.95 2 C. 12805.00 3 D. 18.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Great! thanks!