|
On Aug 9, 4:04 am, earlin...@GMAIL.COM (Chris Sanders) wrote:
> 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
sqlfile might have been set somewhere else before it was declared as
global.
|