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 (October 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 23 Oct 2007 17:29:53 -0000
Reply-To:     Pat <PLarkin2@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Pat <PLarkin2@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Newbie wants to program
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

I work with financial data at a university using SAS 9.1. In the past, I've manipulated my data using an assembly language program that I'm too embarrassed to name (but it starts with an F and ends with a tran) and then entered it into SAS to do regressions and other statistical procs. I've heard that this is a waste of time and that I can just do all of the manipulations in SAS. I am having trouble figuring out how to do that. I know that SAS has an array statement, but I don't think that I really want to make an entire row into an array. Let me try to explain what I'd like to do. It's pretty simple:

x1 y1 z1 x2 y2 z2 . . . . . . xn yn zn

I would like to be able to create a variable, call it w, and make it an array with dimensions n-3 rows by 1 column. Then, do something like this, but using SAS code:

do i=1,n-3 if x(i+3) not equal to -99 then w(i) = x(i+3) + y(i+3) / z(i+3) else w(i) = -99 end if end do

Thanks for your attention


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