BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Ksharp
Super User
"so really interested why you can't share it."
It is BOSS 's requirement.
But in reallity, It haven't been done yet.
Patrick
Opal | Level 21

@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
Super User
Your SAS system is too complicated for me . I am just like workman,and using stand-alone PC sas,not Server sas .

Have Nice Day !
Bye Bye!
Patrick
Opal | Level 21

@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.

Ksharp
Super User

Tom,

And more ,using the code I suggested, I could get right result.

 

Ksharp_0-1716512020395.png

 

Tom
Super User Tom
Super User

@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.

Tom
Super User Tom
Super User

@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.

 

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 21 replies
  • 1020 views
  • 6 likes
  • 5 in conversation