10-09-2014 07:56 AM
We cant do this manually by renaming, i suppose.
I tried like copiying the catlog from one location to another with a different name.
libname test 'location';
proc catalog catalog=test.sasmacr1 force;
copy in=test.sasmacr1 out=work.sasmacr;
By this way, i was able to rename from 'sasmacr1' to 'sasmacr'.
Is there a possible to do this even more simply? Is there a way to rename a macro catalog?
10-09-2014 09:36 AM
Proc catalog is for managing catalogs (sas7bcat) and proc datasets for datasets(sas7bdat). Their internal structure is different.
If you know what your are doing you could rename the datasets at the OS level.
10-09-2014 09:58 AM
Jaap, Haha, actually that is not true. According to SAS documentation. it can change Macro entry name.
Renames one or more SAS ﬁles in the same SAS library.
and I also give it a try :
391 proc datasets library=x nolist nodetails;
392 change sasmacr=mymac ;
NOTE: Changing the name X.SASMACR to X.MYMAC (memtype=CATALOG).
NOTE: PROCEDURE DATASETS used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
10-09-2014 10:18 AM
Thanks for the answers, I have another question on this,
If i have 2 catalogs in a single library, (eg., 'sasmacr' and 'mycat' - by copying mycat from a different location) , i am able to access macros from the catalog 'sasmacr' and not from the catalog 'mycat'.
after setting a macro library with options mstored and sasmstore=<libname>,,,
if i try to use the entries from 'mycat' i am getting error message like 'Macro not resolved'
Should i change any option so that i could use both the catalogs.?
Help me with a solution..
Reply for any clarification required in the question
10-10-2014 07:47 AM
You could try option :
options SASAUTOS= ( work 'c:\temp\') MAUTOSOURCE ;
10-09-2014 09:24 AM
This will do it:
proc datasets library=test memtype=catalog nolist;
10-09-2014 10:24 AM
Yep I have seen it, it is at the catalog level (sas7bcat name) possible.
your are right.
At some moment this was all worthless for me. So I must get that dust away for what was going on.
- Fixed catalog names, part of the autoexec setup. No need for rename just for managing the content of those catalogs.
- SCL usage needing to manage the members in a catalog.
The datasets tables are manageable with proc datasets (Copy move) but failed at the catalog member content.
- As releasemanagement being setup supporting DTAP. The libraries having setup in concatenation.
In this way you can solve the "which version is active" question. by moving the catalogmembers to the according locations.
As there is no version present in D there can be also no mistake for getting seeing the wrong version.
This worked for formats also with an addition to combine a data-defined version when it data-content related
- proc datasets is supporting a move statement (data only) but proc catalog is not.
I ended up using proc upload/download for catalogs as with a copy that does a really merge with existing content.
It also does change the security context using another key so that the developer cannot develop code an other location than development.
O they like to change all kind of things when incidents are coming in direct in the production environment without a change order.
In some cases we did the rename/copy at the OS level verify some assumptions and went back to the original state.
Looks to me usefull information for others.
10-09-2014 10:35 AM
And see one question in the same direction.
I preferred macros at the source level being compiled when needed. It eliminates the question whether the source and the compiled version are belonging to each other.
Setting it up into a dtap concatenation as previous described.
For macros source type: SAS(R) 9.4 Macro Language: Reference, Second Edition (SASautos) I think there is something strange here as it can refer to libnames and filerefs.
For compiled macros there is SASMStore SAS(R) 9.4 Macro Language: Reference, Second Edition It does not have an concatenation type. The libarary def-s do support concatenation. SAS(R) 9.4 Statements: Reference, Third Edition
For FCMP binaries you can imagine a similar approach. SAS(R) 9.4 System Options: Reference, Third Edition (cmplib)
10-10-2014 08:25 AM
There is a new method to insert values to existing system options.
SAS(R) 9.3 System Options: Reference, Second Edition (listinsertappend) SAS(R) 9.3 Companion for UNIX Environments (insert example)
saving automamacros and using: SAS(R) 9.4 Macro Language: Reference, Second Edition
Need further help from the community? Please ask a new question.