|
Ian:
I ran the same program you noted below with the following modification. I
used input char x ; cards; abc 1; run; Following that I put: Proc contents
data=w position; run;
The result is shown below:
Alphabetic list of variables and attributes:
# variable type len pos
1 char num 8 0
2 x num 8 8
variables ordered by position ....
1 char num 8 0
2 x num 8 8
Note that what I got is different from yours. I wonder why!
Neal
---------- Original Text ----------
From: "Ian Whitlock" <whitloi1@WESTAT.COM>, on 5/3/01 11:50 AM:
To: SMTP@Public.11@ACF.WDC[<SAS-L@LISTSERV.UGA.EDU>],Neal K Nair@OPRE@ACF.WDC
Cc: SMTP@Public.11@ACF.WDC["Ian Whitlock" <whitloi1@WESTAT.COM>]
Neal,
Yes, you can use the option, POSITION, in version 8, and you may get
position order, but then again you may not. (I used to think SAS promised
which one.) Try
data w ;
retain char "abc" x 1 ;
run ;
proc contents data = w position ;
run ;
It produces
-----Variables Ordered by Position-----
# Variable Type Len Pos
-----------------------------------
1 char Char 3 8
2 x Num 8 0
Note that CHAR is listed first, but its position comes after that for X.
In prior versions one often used POSITION to obtain the logical order of
variables. The options still does this, but it no longer orders by
physical position. That is why it was replaced by the VARNUM option and
hence became obsolete or deprecated.
However, VARNUM also says
-----Variables Ordered by Position-----
but it omits the position numbers and thus should be considered a mistake
in the supporting words of the report instead wrong, since the variables
are listed in varnum order and the documentation claims they will be.
Ian Whitlock <whitloi1@westat.com>
On Wed, 2 May 2001 13:04:34 EDT, Neal K Nair <nnair@ACF.DHHS.GOV> wrote:
>Ian:
>
>I ran a PROC CONTENTS in Version 8 of SAS with the following statement:
>
>proc contents data=mydatasetname POSITION; run;
>
>The result I got were: 1) Alphabetic list of variables and attributes
> 2) Variables ordered by
position
>(with all the attributes)
>From the result I got, I assumed that the option POSITION is still in
>effect. But the version 8 manual does not inlcude that option. Am I
wrong?
<snip>
|