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

Hello Team,

 

I am stuck with loading of macro ,which one is already located in another folder.

 

One of path ("/x/global/prod") have 20 macros are there and 2 macros are in another folder "Y/global/dev");

 

I need to first compile 20 macros and after compile 2 macros located in another folder .

Note: The 2 macros are in Dev folder are already in Prod folder , but i need to use 2 macros from dev folder because those ones are new one and i want use rest 18 macros from Prod folder.

 

when i use SASAUTOS option it's not compile 2 macros located in Dev folder and it's coming from Prod folder only

 

my code :

options mautosource sasautos=("x/global/prod" "y/global/dev" sasautos); 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Shmuel
Garnet | Level 18

If only 2 out of the 20 macros are in DEV then assign option SASAUTOS so that DEV will be in priority:

 

options mautosource sasautos=("x/global/dev" "y/global/prod" sasautos); 

if a macro is not in DEV sas will look in PROD, and if it is not neither there it will look for in in SASAUTOS.

 

A better way is, each debuged macro should be moved from DEV to PROD when upgrading is completed.

View solution in original post

4 REPLIES 4
Shmuel
Garnet | Level 18

If only 2 out of the 20 macros are in DEV then assign option SASAUTOS so that DEV will be in priority:

 

options mautosource sasautos=("x/global/dev" "y/global/prod" sasautos); 

if a macro is not in DEV sas will look in PROD, and if it is not neither there it will look for in in SASAUTOS.

 

A better way is, each debuged macro should be moved from DEV to PROD when upgrading is completed.

ChrisNZ
Tourmaline | Level 20

The first macro found is the one executed.

Put the DEV path first in the SASAUTOS path list.

 

Also, please correct the typo in the thread title.

Astounding
PROC Star

If both folders contain all 22 macros, you have a problem that SASAUTOS can't solve.  You would need to use a combination of tools:

 

%include 'y/global/dev/first_dev_macro.sas';
%include 'y/global/dev/second_dev_macro.sas'
options sasautos=('x/global/prod' sasautos);

If the prod folder contains only 20 of the 22 macros, then your original approach is correct.

Ksharp
Super User
Also try append system optionlibname x v9 'c:\temp\';
options append=(sasautos=(x sasautos)) ;.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 4 replies
  • 1005 views
  • 0 likes
  • 5 in conversation