Hi all,
I would be grateful for some help on how to access the content of a .sas7bcat file in enterprise guide.
Cheers, Markus
Do you know which version of SAS made the file?
The extension SAS7BCAT means that the file is a catalog. You may not be able to access a catalog created on a different operating system.
What is supposed to be in the catalog that you want to access?
The general approach is to have the file in a LIBRARY that your session has access to prior to use. How to use the contents depends on what is in it.
I assume it was made with the same 9.4 I am using now. It should contain a collection of macros.
This is a catalog file from SAS. If you assign a library to the folder that contains the file, you can then use the Catalog and Formats Explorer tool in SAS Enterprise Guide (under the Tools menu) to see the entries, such as compiled macros and formats.
Yes @ChrisHemedinger , I now can see the macro I am looking for. How can I open it?
@MarkusWeick - While you can report on the contents of SAS catalogs with PROC CATALOG. macro entries can't be "opened", only executed and the source code of the macro cannot be extracted. You need to refer to the SAS code that created the macro originally.
I just tried the tip in Extracting a macro code from Catalog File - SAS Support Communities.
But got the the error message "The /SOURCE option was not specified when the macro M_UC was compiled. So I give up for the moment and search for the source code tomorrow.
Thanks to @Solamente, @ballardw, @ChrisHemedinger, @SASKiwi. You all brought me some steps further even if I haven't reached my goal yet.
Another tip: do not store code/macros in catalogs. If you can't find the source, you are hosed. I have seen that happen as well.
IMO, catalogs are an archaic format and should be avoided at all costs.
Hi @AlanC , thanks for the advice. After my experience so far I definitely won't store code/macros in catalogues.
Cheers, Markus
@AlanC wrote:
I dont even store formats there. It is easier to %include everything.
Computers are just way more powerful than they were back in the day.
Which of course then stores the macros and formats in this archaic format in WORK 😄
But agree with what you say except for the rare exception where one needs secure compiled macros.
@Patrick wrote:
@AlanC wrote:
I dont even store formats there. It is easier to %include everything.
Computers are just way more powerful than they were back in the day.Which of course then stores the macros and formats in this archaic format in WORK 😄
But agree with what you say except for the rare exception where one needs secure compiled macros.
Which is why I keep project specific formats in a permanent library and add the library to the FMTSEARCH path.
That way, as needed, I can override the same named format by making a version in WORK that appears first in the search path and still have both available as needed...
Macro's not so much.
Continuing @AlanC suggestion. Maybe you consider using SAS Packages and SAS Packages Framework.
It allows you to easily share complex codes (a lot of macros, formats, functions, etc.) with others in easy way and at the same time it keeps source code (which is also easily accessible to user [not only developer]).
The latest YouTube video describing SPF is here: https://www.youtube.com/watch?v=T52Omisi0dk
Video about how to build your firs package is here: https://www.youtube.com/watch?v=hqexaQtGw88
Bart
@MarkusWeick - If you switch to using AUTOCALL macro libraries, then by definition you are working off macro source code files stored in a defined AUTOCALL folder. In my experience this is the best way to manage macros and you are a lot less likely to lose them. If you do they stop working...🙂
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.