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 (May 1999, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 28 May 1999 16:59:03 -0400
Reply-To:   WHITLOI1 <WHITLOI1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   WHITLOI1 <WHITLOI1@WESTAT.COM>
Subject:   Re[2]: SASTip: ATTRIB allows association and repetition
Comments:   To: "Karsten M. Self" <kmself@IX.NETCOM.COM>
Content-Type:   text/plain; charset=US-ASCII

Subject: Re: SASTip: ATTRIB allows association and repetition Summary: Correction Respondent: Ian Whitlock <whitloi1@westat.com>

In response to Spencer Hudson's <shudson@viropharma.com> comment

> Interesting, the method also works for overlapping groups and > for name range lists based on position in the PDV:

on Karsten M. Self's <kmself@IX.NETCOM.COM> revelation that the variable specification on the ATTRIB statement can accept lists

Karsten wrote:

> Right. The gist of my comment was that a variable could appear > multiple times, whether implicitly (listed) or explicitly > (enumerated) mentioned in the ATTRIB statement, and that the > _last_ appearance for a _specific_ attribute (length, label, > format, informat) would take precedence.

One has to be careful here. ATTRIB is nothing special, it follows the standard SAS set up for variable properties. Numeric variable length is determined by the last explicit specification and character variable length is determined by the *first* specification. (Note: Formats will determine character length.) The reason is that all numeric variables are handled as 8 byte variables during the DATA step, hence the compiler can let the last specification win, but character length is set with the first implicit length specification because it is handled that way during DATA step processing.

Grouping like variables is fine, but I would not suggest allowing overlapping groups without taking more pains than it is worth.

Ian Whitlock


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