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 (August 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 8 Aug 2008 22:16:06 -0400
Reply-To:   Bucher Scott <SBucher@SCHOOLS.NYC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Bucher Scott <SBucher@SCHOOLS.NYC.GOV>
Subject:   Re: Global macro var stops working
Comments:   To: Chris Sanders <earlinerd@GMAIL.COM>
In-Reply-To:   A<652a2ed0808081904hf710a2q8db2f5a946f95dda@mail.gmail.com>
Content-Type:   text/plain; charset="US-ASCII"

Hi Chris,

Your program has a number of macro variables. Which one is not working? If it is sqlfile, that would be because at no point in the program do you assign a value to it, you only declare it.

Regards, Scott Bucher SAS Programmer Office of Accountability NYC Dept. of Education

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Chris Sanders Sent: Friday, August 08, 2008 10:04 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Global macro var stops working

Hi, y'all,

This is one of those "it worked until now with no changes" things. Something -must- have changed but two hours of trying hasn't turned up anything.

The macro var in this isn't taking - it's coming out blank, but I swear it worked before. Only even then I couldn't figure out how it was getting a value into sqlfile.

%global sqlfile; %macro backemup; %let dsid=%sysfunc(open(tablesnow,is)); %syscall set(dsid); %let nomore = %sysfunc(attrn(&dsid,NOBS)); %do i = 1 %to &nomore; %let rc=%sysfunc(fetchobs(&dsid,&i)); proc sql; create table datalib2.&sqlfile as select * from datalib1.&sqlfile; %end; %let dsid=%sysfunc(close(&dsid)); %mend backemup;

Any help that lets me get on with my Friday night would be greatly appreciated!

Chris


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