ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 108

The contents of the raw data file FURNITURE are listed below:
--------10-------20-------30
chair,,table
chair,couch,table

The following SAS program is submitted:
data stock;
infile 'furniture' dsd;
input item1 $ item2 $ item3 $;
run;
Which one of the following is the value of the variable named ITEM2 in the first observation of the output data set?
A. table
B. ,table
C. . (missing numeric value)
D. ' ' (missing character value)
Click Comment link to get answer

6 comments:

  1. Anonymous2:51 PM

    can some one please explain why it is D
    thanks

    ReplyDelete
  2. Anonymous3:11 PM

    with DSD option two consecutive delimiters are not consider as one, so missing value is assigned to item2 and as item2 is character variable it has missing character value " ". Without DSD Item2 will be table. Hopefully that helps.

    ReplyDelete
  3. bhanu1:26 AM

    hi..without dsd it should be error...

    ReplyDelete
  4. Anonymous8:24 PM

    yes.without dsd it will be error.else you should use dlm=',' option.then consecutive commas will be considered as one.the dataset will have only one observation.for the second reord it will go past the record.

    ReplyDelete