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.
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.
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.
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.
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.
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.
Ready to level-up your skills? Choose your own adventure.