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.
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.
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;
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 😞
%put &x ;
Hope it helps.
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.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
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.