DATA Step, Macro, Functions and more

How to Remove encryption for a macro ?????

Reply
Super Contributor
Posts: 276

How to Remove encryption for a macro ?????

Hi All..

Hope you people doing well..

Recently i had an issue with a macro created by me.

I have created a macro, i have stored and encrypted that macro due to some security reason by using Stored and Secure options in macro.

Like

%macro Test/Store secure;

Proc print;

run;

%end;

Now trying to see source code of the macro by using %Copy,but log was not producing source code because i used   secure option.

Log message was also saying the same.

NOTE: The macro %PRINT was compiled with the /SECURE option.  No output will be produced for     this %COPY statement.



So is there any way to make that macro unsecured???? i mean to say i want to see the source code for that macro..



Any Suggestions??



Regards..


Sanjeev.K

Super Contributor
Posts: 276

Re: How to Remove encryption for a macro ?????

Unfortunately i don't have copy of the macro code.that is the reason i want see that macro code.




Regards.

Sanjeev.K

SAS Employee
Posts: 26

Re: How to Remove encryption for a macro ?????

Sanjeev -

I am very sorry to have to give you the news -- stored compiled macros cannot be restored again, especially with the SECURE option.

The point to the SECURE macro option is to protect the source code.

SAS(R) 9.3 Macro Language: Reference

CAUTION:

Save your macro source code.

You cannot recreate the source statements from a compiled macro. Therefore, you must save the original macro source statements if you want to change the macro. For all stored compiled macros, you should document your macro source code well. You can save the source code with the compiled code using the SOURCE option in the %MACRO statement or you can save the source in a separate file. If you save the source in a separate file, it is recommended that you save the source code in the same catalog as the compiled macro.

In this example, save it to the following library: mylib.sasmacro.myfiles.source

Jan

Valued Guide
Posts: 2,175

Re: How to Remove encryption for a macro ?????

Could you not just rewrite it?

Super Contributor
Posts: 276

Re: How to Remove encryption for a macro ?????

Hi

If i can able to rewrite that macro,no point in posting this question.

the macro has lot's of complex logic and it was pretty big.i spent more then a week to write that macro and unfortunately i lost that code.That is the reason i looking for other solutions.




Sanjeev.K

Ask a Question
Discussion stats
  • 4 replies
  • 562 views
  • 0 likes
  • 3 in conversation