ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 31

The value 110700 is stored in a numeric variable.
Which one of the following SAS formats is used to display the value as $110,700.00 in a report?
A. comma8.2
B. comma11.2
C. dollar8.2
D. dollar11.2
Click Comment link to get answer

17 comments:

  1. Anonymous11:56 AM

    Answer D

    ReplyDelete
  2. Anonymous4:45 PM

    ans is B

    ReplyDelete
  3. Anonymous2:08 AM

    Answer C...As format is Dollar8. and informat is comma 10.

    ReplyDelete
  4. Anonymous1:14 PM

    It can not be C bcz the total width is 11 not 8, so it comes down to either of dollar11.2 or comma11.2. But comma11.2 does not insert dollar sign along with comma. So the answer is D.

    ReplyDelete
  5. Anonymous12:31 PM

    THE ANSWER IS D. DONT THINK TOO MUCH.

    ReplyDelete
  6. Anonymous10:06 PM

    ANSWER IS D 100%

    ReplyDelete
  7. Anonymous2:25 PM

    sakar Sham;

    yes , those who are in favor of C needs thinking. C chooser what is your logic.Why? If you disagree , give us your logical reason.Thks

    ReplyDelete
  8. Anonymous6:58 PM

    data test;
    v1 = 110700;
    v2 = 110700;
    run;

    proc print data=test;
    title 'Base SAS 31';
    format v1 dollar8.2 v2 dollar11.2;
    run;

    ReplyDelete
  9. Anonymous10:39 PM

    its interesting how comma11.2 can be used to read $110,700.00 but it cant be used to write 110700 as $110,700.00

    ReplyDelete
    Replies
    1. Anonymous1:57 PM

      It's beacuse when you use comma11.2 as an informat, sas removes dollar signs, commas and percent signs(if they exist in the value you are trying to read) whereas the format dollar11.2 inserts a dollar sign and a comma. Read the SAS help if you are struggeling.

      Delete
    2. Thank you!
      That was very helpful

      Delete
  10. Anonymous6:00 PM

    110700

    DOLLAR11.2 - $110,700.00
    COMMA11.2 - 110,700.00
    DOLLAR8.2 - 110700.0
    COMMA8.2 - 110700.0

    ReplyDelete
  11. Hello!! I'am glad to read the whole content of this blog and am very excited.Thank you.
    ตารางคะแนน

    ReplyDelete