[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: Best way to automate renaming variables - please help
From:       Sigurd Hermansen <HERMANS1 () WESTAT ! COM>
Date:       2002-10-31 17:19:01
[Download RAW message or body]

Ian has improved the macroprogram and that I wrote. He has also modified the
input process to make it simpler and easier to adapt to new
requirements.
Sig

> >> -----Original Message-----
> >> From: Ian Whitlock
> >> Sent: Thursday, October 31, 2002 10:09 AM
> >> To: Sigurd Hermansen
> >> Subject: RE: Best way to automate renaming variables - please help
> >>
> >>
> >> Sig,
> >>
> >> To simplify the macro and add more information, I would use
> >>
> >> %macro span(product=latex,type=total,start="1jan02"d,span=4);
> >>      do seq = 1 to &span.;
> >>         input val @;
> >>         date=intnx("month",&start,-seq+1) ;
> >>         product="&product" ;
> >>         type = "&type" ;
> >>         output;
> >>      end;
> >> %mend span;
> >>
> >> data test;
> >>   length ID $ 4 type $ 10 product $20 ;
> >>   format date monyy5. ;
> >>   infile fil truncover ;
> >>   input ID $4. @;
> >>   /* One per product. */
> >>   %span(product=latex,type=total,start="1jan02"d,span=4)
> >>   %span(product=neophrene,type=total,start="1jan02"d,span=4)
> >> run;
> >>
> >> Howerver, Chris is not starting with external data.  He has a
> >> SAS data set.
> >>
> >> Ian
> >>

-----Original Message-----
From: Chris Smith [mailto:vandalay-industries@WWW.COM]
Sent: Tuesday, October 29, 2002 10:22 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Best way to automate renaming variables - please help


Hello world,

I have a data set that come to me thusly (Example only - I cannot change
it):

<snip>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic