BookmarkSubscribeRSS Feed
kmcnulty
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.

 

 

5 REPLIES 5
SASKiwi
PROC Star

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.

kmcnulty
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  */

781       

782       

783        options mstored sasmstore=MYSTAGINGLIB;

784        %A5QN9SRM_BE0000BO_1070881485;

785       

SASKiwi
PROC Star

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

JuanS_OCS
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 ( https://communities.sas.com/t5/Base-SAS-Programming/Finding-Location-of-SAS-Macros/td-p/292642 😞

 

 

Hope it helps.

 

Kind regards,

Juan

Bishop346
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 autoexec.sas 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 autoexec.sas 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 autoexec.sas) 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 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1781 views
  • 5 likes
  • 4 in conversation