Can SAS Explict Pass-Through Temp Tables Persist Between PROC SQL Statements + RSUBMIT? -


using explicit sql pass-through, possible temporary sql tables persist between proc sql statements?

i'm using sas 9.3 connect sas server too; there rsubmits. code below simple example of what's occurring.

with code, temp tables created, looks after endrsubmit connection terminated sometime in near future -- code if fine if run straight through, if wait ~10 mins , execute later part, temp tables gone.

the working tables big , transformations faster pass-through, still take time. way make temp tables little more permanent on database side?

/* example */ /* upload list db*/ rsubmit;  proc sql;  connect odbc db (dsn=blahdb uid=&id pwd=&pass connection=global);  execute(load table #mylist (numlist '\n') using client file 'mylist' escapes off quotes off delimited ',') db; quit;run; endrsubmit;  /* join database tables */ rsubmit;  proc sql;  connect odbc db (dsn=blahdb uid=&id pwd=&pass connection=global);  execute(select *     #mylist2      #mylist      join dbtable b on a.var = b.var ) db;  quit; run; endrsubmit;  /* download join sas*/ rsubmit;  proc sql;  connect odbc db (dsn=blahdb uid=&id pwd=&pass connection=global);  create table akwork.sastab select * connection db ( select * #mlist2);  quit;run; endrsubmit; 

global temp tables require db admin rights, correct? don't have that. thanks!

you need use libname command make connection can persist between independent proc sql sessions. without having libref created there no connection between sas , database can kept active.

it least how works sas/access teradata.

libname tdwork teradata server=blahdb user=&id password=&pass connection=global; ... proc sql;   connect teradata db (server=blahdb user=&id password=&pass connection=global);   ... quit; ... proc sql;   connect teradata db (server=blahdb user=&id password=&pass connection=global);   ... quit; 

Comments