Subscribe Bookmark RSS Feed

How to make invisible table

volf

Staff

Joined:

Jun 23, 2011

Hi Jumpers,

When I extract a data from SAS Server, I want to make invisible table.

I think that the below code is work. but, it doesn't work.

also, when these code execute saperately, It works exactly.

HOW can I do that?

<--
SAS Connect( "SASMain" );
SAS Submit(
"proc sql;
create table TestTable as
select *
from sashelp.class
;
quit;",
OpenOutputDatasets( All )
);

Data Table( "TestTable" ) << show window( 0 ); // it doesn't work!!

-->

regard
Volf.
1 REPLY
Presumably you could just take an invisible copy of the table you've just opened (regardless of whether that's come from a server or not) and then close the original one, like this:


style="font-size: 9pt; font-family: "Courier New"; color: black;">



dt

style="font-size: 9pt; font-family: "Courier New"; color: navy;">=

style="font-size: 9pt; font-family: "Courier New"; color: black;">

style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">open

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: purple;">"$SAMPLE_DATA/Big
Class.jmp"

style="font-size: 9pt; font-family: "Courier New"; color: black;">)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: green;">/*





style="font-size: 9pt; font-family: "Courier New"; color: green;">
style="">      
The next line isn't
necessary, but a
sensible precaution





style="font-size: 9pt; font-family: "Courier New"; color: green;">
style="">      
to take if there's any
possibility that
the original table





style="font-size: 9pt; font-family: "Courier New"; color: green;">
style="">      
could have been saved with
only some of
the rows selected -





style="font-size: 9pt; font-family: "Courier New"; color: green;">
style="">      
because if it has, you would
only get
those rows when you





style="font-size: 9pt; font-family: "Courier New"; color: green;">
style="">      
take the subset.





style="font-size: 9pt; font-family: "Courier New"; color: green;">*/

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: black;">dt

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">
select all rows

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">




style="font-size: 9pt; font-family: "Courier New"; color: black;">dti

style="font-size: 9pt; font-family: "Courier New"; color: navy;">=

style="font-size: 9pt; font-family: "Courier New"; color: black;">
dt

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">
subset(invisible)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: rgb(0, 0, 221);">close

style="font-size: 9pt; font-family: "Courier New"; color: black;">(

style="font-size: 9pt; font-family: "Courier New"; color: black;">dt

style="font-size: 9pt; font-family: "Courier New"; color: navy;">,

style="font-size: 9pt; font-family: "Courier New"; color: black;">
nosave)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: green;">//
Now take a
visible copy of the invisible one to see what's in it;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">

 





style="font-size: 9pt; font-family: "Courier New"; color: black;">dtv

style="font-size: 9pt; font-family: "Courier New"; color: navy;">=

style="font-size: 9pt; font-family: "Courier New"; color: black;">
dti

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">
subset(visible)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">





style="font-size: 9pt; font-family: "Courier New"; color: black;">dtv

style="font-size: 9pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 9pt; font-family: "Courier New"; color: black;">
set name(

style="font-size: 9pt; font-family: "Courier New"; color: purple;">"Visible
Copy of DTI"

style="font-size: 9pt; font-family: "Courier New"; color: black;">)

style="font-size: 9pt; font-family: "Courier New"; color: navy;">;

style="font-size: 9pt; font-family: "Courier New"; color: black;">






 


I don't know why the way you're doing it wouldn't work though, if it works when you do the two parts separately.