BookmarkSubscribeRSS Feed
HeatherNewton
Quartz | Level 8

if I run 10 sas program one after another triggered by one sas master program, is the temp data set I created in sas program no. 1 and not saved in folder still available to be used by sas no.10?

 

e.g. in sas program no. 1

proc sql;

    create table _curr_credit_card as

       select *

       from wdata.credit_card;

quit;

 

is _curr_credit_card still available to be used in sas program no. 10.

 

which says:

proc append base=wdata.credit_card_h data=_curr_credit_card;

run;

 

 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

It depends on this "master" SAS program, which you didn't describe. If it is a SAS program which looks like this:

 

%include pgm1.sas;
%include pgm2.sas;
%include pgm3.sas;
/* And so on */

 

then the answer is YES.

 

If it is a batch file that runs in your operating system that calls the ten SAS programs one after another, then the answer is NO.

--
Paige Miller
SASKiwi
PROC Star

Why not run a test for yourself? If you use %INCLUDE in your master program, then just run that program either in a SAS IDE or in batch mode you are only using one SAS session and that means all temporary SAS datasets will exist until the session closes.

PaigeMiller
Diamond | Level 26

Good point @SASKiwi . To @HeatherNewton SAS will give you quicker answers (and answers that are guaranteed to be correct, unlike my answers) than asking in this forum. Trying things yourself is an excellent way to learn.

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 473 views
  • 2 likes
  • 3 in conversation