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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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