Date: Tue, 14 Apr 2009 10:11:29 -0400
Reply-To: Nathaniel.Wooding@DOM.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: Sorting
In-Reply-To: <c6b899fd0904140703t670c98eak274e7e2c8e0f8475@mail.gmail.com>
Content-Type: text/plain; charset="US-ASCII"
As I posted my reply a couple minutes ago, I realized that something from
the documention might help. The following is from the Base/Concepts
section:
Order of Missing Values
Numeric Variables
Within SAS, a missing value for a numeric variable is smaller than all
numbers; if you sort your data set by a numeric variable, observations with
missing values for that variable appear first in the sorted data set. For
numeric variables, you can compare special missing values with numbers and
with each other. Numeric Value Sort Order shows the sorting order of
numeric values.
|---------------------+--+---------+-------------------------------------|
| | | | |
| Numeric Value Sort | | | |
| Order | | | |
| | | | |
|---------------------+--+---------+-------------------------------------|
| | | |
Sort Order | | Symbol | Description |
| | | |
--+---------+-------------------------------------|
| | | |
smallest | | ._ | underscore |
| | | |
--+---------+-------------------------------------|
| | | |
| | . | period |
| | | |
--+---------+-------------------------------------|
| | | |
| | .A-.Z | special missing values A |
| | | (smallest) through Z (largest) |
| | | |
--+---------+-------------------------------------|
| | | |
| | -n | negative numbers |
| | | |
--+---------+-------------------------------------|
| | | |
| | 0 | zero |
| | | |
--+---------+-------------------------------------|
| | | |
largest | | +n | positive numbers |
| | | |
--+---------+-------------------------------------|
For example, the numeric missing value (.) is sorted before the special
numeric missing value .A, and both are sorted before the special missing
value .Z. SAS does not distinguish between lowercase and uppercase letters
when sorting special numeric missing values.
Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Alex Murphy
<goladin@GMAIL.CO
M> To
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
Discussion" cc
<SAS-L@LISTSERV.U
GA.EDU> Subject
Re: Sorting
04/14/2009 10:03
AM
Please respond to
Alex Murphy
<goladin@GMAIL.CO
M>
Well, my guess is that missing values is the smallest? I believe that not
having any value is smaller than having value. But that is just my opinion.
On Tue, Apr 14, 2009 at 9:57 PM, porus <porus.sas@gmail.com> wrote:
> Iam having numeric data obeservations,in this data wen we sorted the
> data dot(.) obeseravations will come first.why?
>
>
>
>
>
>
> Regards,
> Porus.
>
--
Regards,
Murphy Choy
Certified Advanced Programmer for SAS V9
Certified Basic Programmer for SAS V9
DataShaping Certified SAS Professional
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.