LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 4 Sep 2007 16:51:54 -0400
Reply-To:   Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject:   Can SAS read XML data with special missing values?
Content-Type:   text/plain; charset="us-ascii"

Folks,

I am looking at various possibilities for getting data into SAS from another software package that, like SAS, recognizes more than one "flavor" of missing value (Don't Know, Refused, etc.).

XML could be a promising transport mechanism. However, the following code suggests that the SAS XML engine doesn't handle special missing values when importing data:

MISSING D R;

LIBNAME MYXML XML 'c:\junk\XMLFile.xml';

DATA MYXML.TryMiss; INPUT X @@; CARDS; 1 2 3 . D R RUN;

DATA TryMiss; SET MYXML.TryMiss; RUN;

Looking at the XML file created, the special missing values are actually represented as attributes, e.g.:

<X Missing="D" />

However, the engine seems to ignore these when importing.

Any suggestions? The only thing I can think of is to have the XML file use "impossible" numeric values, and then re-translate them all after the data are in SAS (which is much too clunky to be practical).

Thanks!

Mike Rhoads Westat RhoadsM1@Westat.com


Back to: Top of message | Previous page | Main SAS-L page