BookmarkSubscribeRSS Feed
Obsidian | Level 7

I am migrating datamarts from 9.3 to 9.4. Most of them have been successfully migrated but there are a few that won't resolve the macros in 9.4 even though migrating the metadata and the physical data seems to go just fine. Instead of recreating the code in 9.4 it just stays exactly the same as it was in 9.3 with the same macro references which of course can't be resolved.


I am being told I may have to recreate the datamarts in the new environment. This seems unreasonable. I hope someone has some insight.



Opal | Level 21

Can you provide an example of a macro that isn't resolved? Is it a user-defined macro or a SAS-supplied one? How did you reference the macros in 9.3? Are you using the AUTOCALL way of invoking macros? If so then it might simply be a matter of forgetting to copy your AUTOCALL macro libraries to SAS 9.4 which is causing your problem.

Obsidian | Level 7


It's my understanding that this type of macro is recreated when you deploy or run your code. But what is happening is that my 9.4 installation is just taking the 9.3 reference literally, not replacing or regenerating the macro as it's supposed to. But it doesn't do this for my other datamarts. I'm being told that it's because the automatic code of my job is all mixed in with the user written code and it's basically all messed up and there's no way of fixing it. This just doesn't seem right to me.


/* Invoke the stored macro  */



783        options mstored sasmstore=MYSTAGINGLIB;

784        %A5QN9SRM_BE0000BO_1070881485;


Opal | Level 21

That macro looks suspiciously like a SAS-generated one. It might be best to track this with SAS Tech Support.

Amethyst | Level 16

Hello @kmcnulty,


I concurr with the comments provided by @SASKiwi. You won;t have to recreate your datamart, that is nuts. But probably the macro path is not being resolved or macro is not resolved for some reason, to be discovered.


There are a few utilities that might help you, all of them contained in this post ( 😞



Hope it helps.


Kind regards,


Calcite | Level 5

The error is basically saying that SAS cannot resolve the full path+name to the macro being called.  If the code has not changed then this can be a simple case of the file not being ported over to the new install location. 


That was our problem.  I troubleshot all of the complicated issues first before going right back to basics. Once we copied the old to the new location containing SAS.exe so that the base SAS System 9.4 and updated the settings in Enterprise Guide (with the same code in the all of our old code executed as expected without errors.


Sometimes it's the simple things.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 4 in conversation