/* clear any connection */ libname x clear; libname x sybase user=test pass=test connection=global; /* create the temp table. You can even use bulk copy */ /* Notice how the name is specified: '#mytemp'n */ data x.'#mytemp'n (bulk=yes); x=55; output; x=44; output; run; /* print it */ proc print data=x.'#mytemp'n; run ; /* The same temp table persists in PROC SQL, */ /* with the global connection specified */ proc sql; connect to sybase (user=austin pass=austin connection=global); select * from connection to sybase (select * from #mytemp); quit; /* use the temp table again in a procedure */ proc means data=x.'#mytemp'n; run; /* drop the connection, the temp table is automatically dropped */ libname x clear; /* to convince yourself it's gone, try to access it */ libname x sybase user=austin password=austin connection=global; /* it's not there */ proc print data=x.'#mytemp'n; run;