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: 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
  • 1 reply
  • 485 views
  • 1 like
  • 2 in conversation