LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 26 Feb 2004 17:01:36 -0500
Reply-To:     Don Stanley <don_stanley@PARADISE.NET.NZ>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Don Stanley <don_stanley@PARADISE.NET.NZ>
Subject:      Re: Confused - position order of variables in a SAS data set
Comments: To: Jimmy Greeley <SASbum@AOL.COM>

These numbers are nothing to do with the PDV. PROC CONTENTS "pos" refers to the physical storage in the dataset, whilst the PDV is a SAS datastep entity. What you are seeing I believe is SAS storing all numerics together, and all characters together in the SAS dataset. Reason-- most likely to acheive greater compression when the COMPRESS option is used. The position # I believe is what relates to what you would see PDV wise (and in any var list in a proc).

Don

On Thu, 26 Feb 2004 16:55:01 -0500, Jimmy Greeley <SASbum@AOL.COM> wrote:

>Hello. My understanding was that variables were added to the PDV in the order they were seen by the compiler. So I would expect the varibles in this data set (code below - Version 8) to be, in position order: A B C D E. Yet when I run a PROC CONTENTS, it looks like the numerics are put in position order first? The position # is OK (1-5) but the actually physical postion (0, 8, 16, etc.) suggests something different. What am I missing here? > >Thanks, Jimmy > >data new; >input A $ B $ C D E; >cards; >abcd x 1 2 3 >efghijk y 4 5 6 >lmn z 7 8 9 >; > >Proc contents position; >run; > >-----Alphabetic List of Variables and Attributes----- > ># Variable Type Len Pos >1 A Char 8 24 >2 B Char 8 32 >3 C Num 8 0 >4 D Num 8 8 >5 E Num 8 16 > > >-----Variables Ordered by Position----- > ># Variable Type Len Pos >1 A Char 8 24 >2 B Char 8 32 >3 C Num 8 0 >4 D Num 8 8 >5 E Num 8 16


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