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 (June 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 17 Jun 1999 12:16:31 -0600
Reply-To:   Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:   Re: Variable Order in Datasets
Comments:   To: bjohnson@SACHS.COM
Content-Type:   text/plain; charset=US-ASCII

No, it would have to be

data yourfile; retain address1 address2 city; set yourfile; run;

This may be the single most frequently asked question on SAS-L, and there are numerous solutions. The best method depends on your data, how you will use them, and your knowledge of SAS. Two other solutions are a data step view and an SQL view.

-- JackHamilton@FirstHealth.com Development Manager, METRICS First Health, West Sacramento, California USA

>>> Bruce Johnson <bjohnson@SACHS.COM> 17Jun1999 10:43 AM >>> Data yourfile; set yourfile; retain address1 address2 city; run;

That should do it!

-----Original Message----- From: Lyon, Shawn [mailto:LyonS@FRANKLINHEALTH.COM] Sent: Thursday, June 17, 1999 12:14 PM To: SAS-L@AKH-WIEN.AC.AT Subject: Variable Order in Datasets

Is there a way to rearrange the order of variables in a dataset?

Ex:

What I have:

1. Address1 2. City 3. Address2

What I want:

1. Address1 2. Address2 3. City

The actual order in which the fields occur is important for exporting data to an app we have.

TIA

Shawn M. Lyon Programmer Franklin Health, Inc. Phone: (201) 512-7047


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