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-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!

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