@Ksharp wrote:
"so really interested why you can't share it."
It is BOSS 's requirement.
But in reallity, It haven't been done yet.
Ah, yes, one of these requirements....
Another personal opinion: I don't like the mstore, especially in a Dev environment. It needs another library that you can't hide in EG/Studio and once assigned it's really hard to change anything in the macro catalog under mstore. What I've done last time: Compile the macros into a catalog in a read only location, create an %init macro that copies the secure compiled macros into the catalog under WORK.
The macro code itself was also in a read only folder with tokens for user and password. And then a macro that can be called passing user and password as parameters that then compiles all the other macros and stores them in the read only catalog (for the unlikely but certainly rare case the PW needs to change; and this process fully documented in a run book).
@Ksharp 🤣 Sure, you're such a simple guy...
A bit more in earnest: This was for a risk solution where we had to run a solution macro in batch that needed to authenticate against the mid-tier to create a auth token for rest calls. By having the pre-compiled macro with credentials in the WORK catalog we could "overlay" the SAS solution provided version that got called in a interactive scenario where the user was already authenticated against the mid-tier.
Tom,
And more ,using the code I suggested, I could get right result.
@Ksharp wrote:
It looks like %sysmacexist() only check the user defined macro ,not built-in system macro .
34 %put %sysfunc(ifc(%sysmacexist(scan), Yes Exists, Does not Exist));
Does not Exist
%SCAN() is NOT a macro at all. It is a built in macro function. Just like %LENGTH() and the others.
@pavank wrote:
%macro sort (dname, new, svar) ; proc sort data=&dname out=&new ; by &svar; run; %Mend; %sort(sashelp.class, demo1,sex); data _null_; if cexist("WORK.SORT") then put "WORK.SORT exists"; else put "WORK.SORT does not exist"; run;
Hi Experts,
here i am trying macro catolog exist or not but its giving wrong output please check where i did wrong
I cannot tell what you are trying to find.
Are you trying to find out of the macro SORT exists in some catalog somewhere? If so you are not looking for the right catalog. Normally compiled macros will be placed in WORK.SASMACR catalog. But if you are using tools like SAS/Studio to launch SAS then they will be placed in the WORK.SASMAC1 catalog instead.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.