Date: Tue, 25 Mar 2003 16:16:09 -0800
Reply-To: "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Subject: Re: Classic Mistake
In-Reply-To: <065201c2f32a$b03f9c50$6dc8a8c0@speedy>
Content-Type: text/plain; charset="us-ascii"; format=flowed
Double dots? .....
At 06:00 PM 03/25/2003 -0600, Kevin Myers wrote:
>Iam -
>
>Whew! Boy Ian, that's a good one. I hate to say it, but I'm stumped
>without further testing. At first I thought that there might be a problem
>with resolution of &dirdata at macro compile time rather than execution
>time, but after some testing that doesn't seem to be the case. In fact,
>this macro seems to work fine on my system, though I commented out the proc
>copy and just ran with options mprint for testing. The only other thing
>that I can see which might be an issue is that there is no run statement,
>but I wouldn't think that should be a real problem either. What am I
>missing???
>
>s/KAM
>
>
>----- Original Message -----
>From: "Ian Whitlock" <WHITLOI1@WESTAT.COM>
>Newsgroups: bit.listserv.sas-l
>To: <SAS-L@LISTSERV.UGA.EDU>
>Sent: Tuesday, March 25, 2003 3:52 PM
>Subject: Classic Mistake
>
>
> > A colleague came this afternoon with a problem. She is converting version
>6
> > data to version 8 data in preparation for a move to from HP-Unix to Linux.
> > She had a program like the following.
> >
> > %macro convert ;
> > libname v6 v6 "&dirdata\v6";
> > libname v8 v8 "&dirdata";
> >
> > proc copy in = v6 out = v8;
> > %mend ;
> >
> > %let dirdata=\home2\data1; %convert;
> > %let dirdata=\home2\data2; %convert;
> > /*
> > <more of the same>
> > */
> >
> > The problem was that the first version 6 library was not getting
>converted.
> > She was running in batch mode. Why? It is an important lesson to
> > understand about macro. I am ashamed to say I spent more time thinking
> > questioning thoughts about SAS than should be needed before recognizing
>the
> > error (perhaps because I found the style of code so different from mine).
> > If you want to test you can run on any system, just make sure that there
>are
> > many lines of code commented out and use good directory names for your
> > system.
> >
> > IanWhitlock@westat.com
> >
------------------------------------------------------------
William W. Viergever Voice : (916) 483-8398
Viergever & Associates Fax : (916) 486-1488
Sacramento, CA 95825 E-mail : wwvierg@attglobal.net
------------------------------------------------------------
|