Date: Wed, 25 Jan 2006 10:18:57 -0500
Reply-To: "Dorfman, Paul" <paul.dorfman@FCSO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Dorfman, Paul" <paul.dorfman@FCSO.COM>
Subject: Re: if input(chardate,mmddyy8.) <= .z
Herman,
There are 28 missing values in SAS related to each other as follows:
._ < . < .a < .b < ... < .x < .y < .z
The 'standard' missing value (null) whose literal is traditionally coded
as period is the second smallest of all missing values as shown see above.
The logic behind it is the same as the one behind the fact that the
underscore precedes the blank in any collating sequence, so everything
will fall in place logically if you think of any missing value as "dot-
something". Thus, the smallest null is "dot-underscore", the next smallest
null (standard) is "dot-blank", the next is "dot-a", and so on, and the
largest is "dot-z". So, the condition
if value <= .z
is nothing but "if value is any missing value". Perhaps using the missing
() function, which became available AFAIR in Version 8, could make this
all easier and more self-explanatory:
if missing (value) then...
Unless I am testing for a concrete special missing value, I have ended up
with the habit of using the missing() function to test for the condition,
in part because the latter has the extra benefit of being insensitive to
the data type of its argument. That is, no matter whether VALUE is numeric
or character, missing(value)=1 if the argument is null and 0 otherwise. Of
course, this means that if VALUE is character, the function will return 1
only if VALUE is spaces.
Kind regards
------------
Paul Dorfman
Jax, FL
------------
On Wed, 25 Jan 2006 08:14:39 -0500, Herman Jacobs <hejacobs@SKYNET.BE>
wrote:
>A certain mister Volker has posted this:
> if input(chardate, ?? mmddyy8.) <= .z then
> ... /* this date is invalid or incomplete */
>
> It works !! but can someone explain the ".Z" ??
>
>GR,
>Herman
|