LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 10 Feb 2005 10:41:28 -0800
Reply-To:   marks@UNFORGETTABLE.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Mark S Goldberg <marks@UNFORGETTABLE.COM>
Organization:   http://groups.google.com
Subject:   Re: 6.12 Macro catalog conversion to 9.1.3
Content-Type:   text/plain; charset="iso-8859-1"

Well, I received a reply from SAS support. Unfortunately the reply was... "This is a bug in SAS for 9.1 and the developer is aware of the problem. Unfortunately I do not have a work around other than not using %COPY inside a macro." ...

I was, however, able to achieve a workaround as follows... * ========================================================= ; * Getting the source from stored_compiled(with source) macro catalogs ; * Note: SAS 9.1 has KNOWN bug that doesn't allow %copy within a macro ;

libname oldmacs v9 '/sasprog/templates/macro_catalog_old' access=readonly ; ods output catalog_random=cr ; * this section can alternatively be done with an SQL of dictionary.catalogs ; ods listing close ; proc catalog c=oldmacs.sasmacr ; contents ; quit; ods output close ; ods listing ;

data cr ; set cr ; var1='%copy ' ; var2=' / source outfile="$HOME/'||trim(objname)||'.sas" ; ' ; run;

options nodate nonumber ; proc print data=cr noobs label ; var var1 objname var2 ; title1 'libname lib1 "/sasprog/templates/macro_catalog_old" access=readonly ; ' ; title2 'options mstored sasmstore=lib1 ; ' ; label var1='*;' objname='*;' var2='*;' ; run; * ========================================================= ;

The output of this is the actual program needed to accomplish the %copy within a macro.


Back to: Top of message | Previous page | Main SAS-L page