BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JeffM
Fluorite | Level 6

Hi,

 

I have setup a process that parallel processes 8 programs to pull a lot of data. However, I have to maintain all of the variables in each one going forward (this is a monthly thing).

 

Is there a way to create 1 master program with all of the variables and share them across programs when running? I understand each program uses its own instance of SAS so I am thinking no.

 

Thanks

Jeff

1 ACCEPTED SOLUTION

Accepted Solutions
JeffM
Fluorite | Level 6

The SAS guru at my company finally got back to me with the hookup!  She said to use an "environment" node to handle everything.

 

In the environment program:

 

options presenv

 

filename env "filepath"

 

lib statements

Let statements

etc

 

proc presenv permdir=mylib (assuming you created this earlier) sascode=env;

run;

 

In each subsequent node you just need to put:

 

filename myenv "filepath for env file above";

%include myenv;

 

the filename in the child nodes need to be different than the master one (myenv vs env)

 

Cheers!

 

Jeff

 

 

 

View solution in original post

3 REPLIES 3
Astounding
PROC Star

Save the variable names in a permanent SAS data set.  It should be quick and easy for each program to extract the list of variable names, and it makes for easy maintenance if you decide to add a variable name to the list.

JeffM
Fluorite | Level 6

Thanks!  I'll look into that

JeffM
Fluorite | Level 6

The SAS guru at my company finally got back to me with the hookup!  She said to use an "environment" node to handle everything.

 

In the environment program:

 

options presenv

 

filename env "filepath"

 

lib statements

Let statements

etc

 

proc presenv permdir=mylib (assuming you created this earlier) sascode=env;

run;

 

In each subsequent node you just need to put:

 

filename myenv "filepath for env file above";

%include myenv;

 

the filename in the child nodes need to be different than the master one (myenv vs env)

 

Cheers!

 

Jeff

 

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 664 views
  • 0 likes
  • 2 in conversation