Hi
I recently changed computer from a 32 bit windows Vista machine to a 64 bit Windows 7 machine running SAS 9.4 x64 bit. I am trying to compile globally used SAS macros, but I receive an error message. Could some good person briefly explain why this is happening and me how to overcome the error. Is there something simple I need to do. I am just starting to reuse SAS again, so still learning. Below is my code and error message.
Thanks
Ian.
Macro code:
**** PUT ALL GLOBAL MACRO VARIABLES IN ALPHABETICAL ORDER ***;
options mstored sasmstore=utility;
%macro putmacrovars / store source
des = 'Puts all the global macros and their values in the output window';
title 'Current global macro variables in alphabetical order';
footnote;
proc sql flow;
select name, value
from dictionary.macros
where scope='GLOBAL'
order by name;
quit;
%mend;
Error message:
110 **** PUT ALL GLOBAL MACRO VARIABLES IN ALPHABETICAL ORDER ***;
111 options mstored sasmstore=utility;
112 %macro putmacrovars / store source
NOTE: The SAS System was unable to open the macro library referenced by the SASMSTORE = libref
UTILITY.
ERROR: File UTILITY.SASMACR.CATALOG was created for a different operating system.
ERROR: A dummy macro will be compiled.
113 des = 'Puts all the global macros and their values in the output window';
114 title 'Current global macro variables in alphabetical order';
115 footnote;
116 proc sql flow;
117 select name, value
118 from dictionary.macros
119 where scope='GLOBAL'
120 order by name;
121 quit;
122 %mend;
123
I think I solved my own problem.
Since I am using this macro a lot, I have saved the compiled macro in a library called utility. Since the old compiled macro was still in this place (physical memory) and was compiled under my 32 bit machine, I got the error. To fix the problem, I simply changed the library name to point to a different physical memory space and the 64 bit SAS recompiled the macro and stored it there. This removed the conflict and the error.
Can you explain why you would use stored compiled macros? I know you can do this, but I cannot imagine an application where this would be preferred to just using SASAUTOS to compile macros on demand.
Hi Tom. Thanks for the question. The truth is I am using code that I read from somewhere and the SASMSTORE option is what it had. I guess I don't really understand what it is doing, so your question makes me think.
When migrating to a new release of sas Understand the impact of that with foreign and native file and never use the old physical catalogs. Do not believe the os guys telling you the data is still there you have to think on migrating physical datasets.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.