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 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 18 Feb 2008 23:21:23 -0500
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: data step
Comments: To: Miguel Hoz <miguel_hoz@YAHOO.ES>
Content-Type: text/plain; charset=ISO-8859-1

Miguel,

As Jiann indicated, you can do what you want with proc sql. However, you can also accomplish the same thing in a data step. For example,

data have; input lname$ fname$; do i=1 to 1000000;output;end; cards; lname1 fname1 lname2 fname2 ;

data want; if _n_ eq 1 then do; retain fname; end; set have; run;

HTH, Art --------- On Tue, 19 Feb 2008 02:55:04 +0000, Miguel de la Hoz <miguel_hoz@YAHOO.ES> wrote:

>I am starting my problem with the following disposal of my dataset:

# variable 1 lname 2 fname

I am trying to export it to excel but it is keeping that order. I would like to be able to write

# variable 1 fname 2 lname

This is only an example my dataset contains around 20 fields.

Thanks.

MDH.

______________________________________________ ¿Con Mascota por primera vez? Sé un mejor Amigo. Entra en Yahoo! Respuestas http://es.answers.yahoo.com/info/welcome


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