BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ujjawal
Quartz | Level 8

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!

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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

1 REPLY 1
FreelanceReinh
Jade | Level 19

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.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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