if _N_=1 then days_since=today()-'01jan2003'd;
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
Sent: Thursday, July 15, 2004 1:00 PM
Subject: A Constant in SAS
I am working in Windows XP SAS V8.1 I inherited a SAS program that divides
a variable by the number of days since jan 1 2003. The method by
predecessor used is ugly but works. He divided the first row of the dataset
by _N_ or one. Since the first row was Jan 1 2003 data and and he has a row
in the dataset for each day since jan 1 2003 and all he wanted was the last
row divided by number of days since jan 1 2003 this did works.
I am trying to replace this situation with something more understandable,
Temporarily I have derived the number of days since jan 1 2003 in the
datastep above the datastep where the division of the variable by the number
of days since Jan 1 2003 is done. This puts the number of days since jan 1
2003 in the datastep where the division is done.
My question is: Is there someway of deriving the number of days since jan
1, 2003 at the top of the program and then putting that number into a
constant variable I can use later in the datastep where the division is done
Thanks in Advance
Data Mining Analyst
2450 45th St.
Emeryville, CA, 94608
Phone 510 655 0800 ext 4151