The contents of the raw data file AMOUNT are listed below:
--------10-------20-------30
$1,234
The following SAS program is submitted:
data test;
infile 'amount';
input @1 salary 6.;
run;
Which one of the following is the value of the SALARY variable?
A. 1234
B. 1,234
C. $1,234
D. . (missing numeric value)Click Comment link to get answer
Repeat question answer is D.
ReplyDeleteAnswer D
ReplyDeleteD(missing)
ReplyDeleteD
ReplyDeleteD,
ReplyDeleteshould have been DOLLAR6. informat.
Answer is D should have been use DOLLAR OR COMMA
ReplyDeleteD
ReplyDeleteThe answer id D missing numeric , it is not repeated question
ReplyDeleteD
ReplyDeleteAnswer is D
ReplyDeleteRead in using Dollar format or read in as a character.
If it is supposed to use DOLLARw.d and we use COMMAw.d, the results will be similar but without the dollar sign. I suppose the result will be 1234, if we use 6. rather than DOLLAR6. Why missing value?
ReplyDeleteI think the answer is D,
ReplyDeleteB & C are out as there cannot be any , or $ in the data.
I opted A out as without the proper informat Dollarw.d, SAS will not be able to read the non standard data $ and ,.
Can the admin plz answer this?
Sakar Sham;
ReplyDeleteSome where we said automatic conversion, this rule does not apply on Dollars sign?
Jahangir
ReplyDeleteAnswer: D