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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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