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 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, 22 Jan 2004 16:00:21 -0500
Reply-To:     "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Subject:      Re: proc SORT - create variables during execution?
Content-Type: text/plain; charset="iso-8859-1"

Kinda.

Create a view that adds the additional field, sort the view specifying an out= dataset.

data a / view=a; set ds1; tempyear = year(target_date); run;

proc sort data = a out = ds2; by ... ; run;

-----Original Message----- From: Rebecca Jones [mailto:rjones2@FFIC.COM] Sent: January 22, 2004 3:50 PM To: SAS-L@LISTSERV.UGA.EDU Subject: proc SORT - create variables during execution?

Is there any way to code a proc SORT to create a new field in the out= dataset? For instance, a year variable from an existing date: TEMPYEAR = year(TARGET_DATE).


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