BookmarkSubscribeRSS Feed
austin_sas
Fluorite | Level 6

when I run the entire code both work.crsp_indx  and work.sicx are shown in output data tab. When I run them sequentially, i.e. first run one and then run the other one then only the last one is shown. I understand at the end the first table is still there and I can use it for future commands. But what can I do to make both of them stay even when run blocks of codes one by one?

(I know I can for example use the following code to make the first table show but I'm trying to find a solution which does not need extra coding after each run.

data crsp_indx ;
set crsp_indx ;
run;

)

 

proc sql;
create table crsp_indx as
select vwretd,date,spindx From crsp.dsi
where date>='01DEC2002'd and date<'31DEC2020'd ;
*quit;
RUN;

 

 

proc sql;
create table sicx as
select sic,gvkey From compa.company;
*quit;
RUN;

3 REPLIES 3
ballardw
Super User

What SAS environment are you running?

 

If you want to view the data set, that only shows one, most likely the last created by default.. This is intentional because data sets can have different variables or same named variables with different properties. 

You are not creating any "output" that could be displayed in a single window only data sets. You will have to open data sets separately. Go to whereever you see your libraries, open the library and click on the desired data set(s) one at a time.

 

You could use Proc Print to send the output to an actual output window that will display more than one result.

austin_sas
Fluorite | Level 6

I'm using SAS Studio

Kurt_Bremser
Super User

Enterprise Guide or SAS Studio will only show the datasets created in the last run from a node; if you submit only part of the code, only datasets created in that part will show up.

Any datasets created before that will still be available through the WORK library in the server list, as long as the SAS session is not terminated or restarted.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1017 views
  • 0 likes
  • 3 in conversation