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 (January 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 25 Jan 2010 20:19:08 -0600
Reply-To:     Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Subject:      Re: SASware ballot #18 Proc Transpose preserving variable
              attributes
Comments: To: Ted Clay <tclay@ashlandhome.net>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
              reply-type=original

Yes, FORCE was a late addition not included in my original proposal, but necessary to make the proposed options and statements more useful. Using the FORCE option would force TRANSPOSE to create appropriate attribute variables even if no variable being transposed has a given attribute. For example, with the current implementation, a LABEL variable (e.g. _LABEL_) is only created if at least one of the variables being transposed actually has a label. This can adversely complicate subsequent steps that must add extra logic to alter processing depending upon whether or not the _LABEL_ variable exists. Using FORCE would eliminate the need for such logic by causing the LABEL variable to be created whether or not any of the variables being transposed actually have a label. In this case, the LABEL variable would have blank values for all observations. Make sense?

s/KAM

----- Original Message ----- From: "Ted Clay" <tclay@ashlandhome.net> To: "'Kevin Myers'" <KevinMyers@AUSTIN.RR.COM>; <SAS-L@LISTSERV.UGA.EDU> Sent: Monday, January 25, 2010 16:36 Subject: RE: SASware ballot #18 Proc Transpose preserving variable attributes

> Kevin, > Did you mean to type "FORCE" on Proc Transpose? Did I miss a feature in > your proposal? > Ted > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kevin > Myers > Sent: Monday, January 25, 2010 1:23 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: SASware ballot #18 Proc Transpose preserving variable > attributes > > Oh come on Null... > > As mentioned in the message, the example program is merely an > overly-simplistic test case strictly intended to illustrate and exercise > all > of the necessary features. Any real application would include additional > logic between the two transpose steps, or read the desired attributes > values > from a "self-defining" external file. > > The real trick is for you to simulate the *second* transpose step with > comparably simple code of your own. For you to say that the proposed > TRANSPOSE enhancements are not needed, that is what you must be able to > accomplish. So, are you up to the challenge? > > ----- Original Message ----- > From: "Data _null_;" <iebupdte@GMAIL.COM> > To: <SAS-L@LISTSERV.UGA.EDU> > Sent: Monday, January 25, 2010 15:12 > Subject: Re: SASware ballot #18 Proc Transpose preserving variable > attributes > > >> On 1/25/10, Kevin Myers <KevinMyers@austin.rr.com> wrote: >>> proc transpose data=original out=skinny type length format informat >>> force >>> noformat; by obsno; >>> var _all_; run; >>> >>> proc transpose data=skinny out=final noinformat; by obsno; >>> id _NAME_; idlabel _LABEL_; idtype _TYPE_; idlength _LENGTH_; idformat >>> _FORMAT_; idinformat _INFORMAT_; >>> var col1; run; >>> >>> If you can manage to accomplish something similar with code that is >>> anywhere >>> remotely close to something this simple, then you win a (virtual) >>> cookie. >> >> Seems obvious: data=original >> > > >


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