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

One runs multiple SAS programs via %INCLUDE, but this approach does not isolate each program. Is there any method to isolate or separate each module to avoid potential interference issues due to naming of libraries, variables, global macro variables, or macro names?

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

What do you mean by "isolate" a program? Do you mean it runs completely independently of any other program? If so, then just running that program in batch mode will do what you want. A program run in batch mode has its own exclusive SAS session just for the duration of the program run.

 

I consider it best practice to globally assign shared SAS libraries (via SAS metadata) and share macro variables and macros (using AUTOCALL libraries). This reduces code inconsistencies and maintenance hugely. By setting up a common SAS environment shared by all SAS programs, the chance of interference between programs is minimal in my experience.

View solution in original post

1 REPLY 1
SASKiwi
PROC Star

What do you mean by "isolate" a program? Do you mean it runs completely independently of any other program? If so, then just running that program in batch mode will do what you want. A program run in batch mode has its own exclusive SAS session just for the duration of the program run.

 

I consider it best practice to globally assign shared SAS libraries (via SAS metadata) and share macro variables and macros (using AUTOCALL libraries). This reduces code inconsistencies and maintenance hugely. By setting up a common SAS environment shared by all SAS programs, the chance of interference between programs is minimal in my experience.

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 16. 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
  • 1 reply
  • 425 views
  • 1 like
  • 2 in conversation