BookmarkSubscribeRSS Feed
iank131
Quartz | Level 8

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

4 REPLIES 4
iank131
Quartz | Level 8

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.

Tom
Super User Tom
Super User

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.

iank131
Quartz | Level 8

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.

jakarman
Barite | Level 11

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.

---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2241 views
  • 0 likes
  • 3 in conversation