DATA Step, Macro, Functions and more

Macro run for trial period

Accepted Solution Solved
Reply
Regular Contributor
Posts: 183
Accepted Solution

Macro run for trial period

I have written 12k lines of code over 2 years. I want some portion of code to be run for trial period (4 months). After that it should stop working unless the original developer of the macro wants to make it work.

 

 

What i could think off creating a reference variable that calculates difference of today's date and 2nd quarter of 2016 -

x = intck('month', date(),yyq(floor(exp(8))- 964, ceil(arcos(0.5))));

If x <= 0 then stop macro. 

It's too easy for intermediate SAS user to crack the above code. INTCK, date() functions are easy to understand. Is there any geek way to do it? Any trick with DO LOOP / SQL to create a password that works only till 2nd quarter of 2016?

Any help would be highly appreciated!


Accepted Solutions
Solution
‎12-17-2015 03:17 PM
Trusted Advisor
Posts: 1,117

Re: Macro run for trial period

If you provide the macro source code to the users, they will always be able (at least in principle) to cancel your restrictions. Have you looked into the SECURE option of the %MACRO statement? This would encrypt the contents of a macro (which must be stored in a stored compiled macro library). Thus, even a straightforward check of the DATE() value would be possible, I think.

View solution in original post


All Replies
Solution
‎12-17-2015 03:17 PM
Trusted Advisor
Posts: 1,117

Re: Macro run for trial period

If you provide the macro source code to the users, they will always be able (at least in principle) to cancel your restrictions. Have you looked into the SECURE option of the %MACRO statement? This would encrypt the contents of a macro (which must be stored in a stored compiled macro library). Thus, even a straightforward check of the DATE() value would be possible, I think.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 167 views
  • 0 likes
  • 2 in conversation