Base SAS 5

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

14 comments:

  1. Repeat question answer is D.

    ReplyDelete
  2. D,
    should have been DOLLAR6. informat.

    ReplyDelete
  3. Answer is D should have been use DOLLAR OR COMMA

    ReplyDelete
  4. The answer id D missing numeric , it is not repeated question

    ReplyDelete
  5. Answer is D
    Read in using Dollar format or read in as a character.

    ReplyDelete
  6. 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?

    ReplyDelete
  7. I think the answer is D,

    B & 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?

    ReplyDelete
  8. Sakar Sham;

    Some where we said automatic conversion, this rule does not apply on Dollars sign?

    ReplyDelete
  9. Jahangir
    Answer: D

    ReplyDelete