BookmarkSubscribeRSS Feed
kuridisanjeev
Quartz | Level 8

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

4 REPLIES 4
kuridisanjeev
Quartz | Level 8

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




Regards.

Sanjeev.K

jwsquillace
SAS Employee

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

Peter_C
Rhodochrosite | Level 12

Could you not just rewrite it?

kuridisanjeev
Quartz | Level 8

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 1720 views
  • 0 likes
  • 3 in conversation