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 (August 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 25 Aug 2010 15:34:40 -0400
Reply-To:     Chang Chung <chang_y_chung@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Chang Chung <chang_y_chung@HOTMAIL.COM>
Subject:      Re: PROC SQL "IS NULL" Question
Comments: To: Craig Johnson <cjohns38@GMAIL.COM>
Content-Type: text/plain; charset=ISO-8859-1

On Wed, 25 Aug 2010 13:51:54 -0500, Craig Johnson <cjohns38@GMAIL.COM> wrote:

>I figured as much, I was just trying to avoid rewriting an update query that >uses the generic format �&var=&solution�. This format works for text and >character fields that aren't null. When the value is null for a numeric >value I can still use =. where as if it�s a character field it looks like I >have to use �is null� without the equals. That messes up the macro where I >have &var=&solution as �=.� Works but �=is null� throws an error. I guess >I�ll have to figure out a way make it conditional based on if the field is >null or not. Have to think about that one.....

Hi,

This is OT, but m$ access text fields have a property called "AllowZeroLength," when it is set to true, then the fields can store a zero- length string(""), which is different from Null. Access Help, SQL reference, even suggests distinguishing between the two by using "Format" property -- like showing "None" for displaying a zero-length string.

On the other hand, SAS character variables have no equivalent to Null's or Zero-length string's, since they are of fixed length. SAS missing(cvar) function returns true when the cvar has only the blanks (the same number as its length).

Now, for SAS macro's, where everything is text, there is no concept of Null, but you *can* assign *nothing* to a macro variable like so: %let mv=;

Hope this helps a bit sorting out the proper course of action. Transferring data from one system to another is always tricky, because for a faithful job, you need to be familiar with all the systems involved. :-(

Cheers, Chang


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