Compile a macro from GitHub gist

Accepted Solution Solved
Reply
Contributor
Posts: 46
Accepted Solution

Compile a macro from GitHub gist

Hi all, is there a way to compile a macro directly from GitHub gist?


Accepted Solutions
Solution
‎03-19-2017 01:17 PM
Super User
Posts: 9,294

Re: Compile a macro from GitHub gist

Posted in reply to MetinBulus

SAS macros are code pieces provided as text. Copy/paste into a code window, and run that. That compiles the macro for the current SAS session.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code

View solution in original post


All Replies
Solution
‎03-19-2017 01:17 PM
Super User
Posts: 9,294

Re: Compile a macro from GitHub gist

Posted in reply to MetinBulus

SAS macros are code pieces provided as text. Copy/paste into a code window, and run that. That compiles the macro for the current SAS session.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 46

Re: Compile a macro from GitHub gist

Posted in reply to KurtBremser

I am using the following but it doesn't work

 

%include "https://gist.github.com/.../....";

Here is the warning:

WARNING: Physical file does not exist, C:\Windows\system32\https:\\gist.github.com\...\...

 

Super User
Posts: 9,294

Re: Compile a macro from GitHub gist

Posted in reply to MetinBulus

%include only works from the local filesystem, it can't resolve URLs.

So you need to download the file to your SAS machine and include from there.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 46

Re: Compile a macro from GitHub gist

Posted in reply to KurtBremser

Thank you, I will advise those plan to use the macro to download and run %include.

☑ This topic is solved.

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

Discussion stats
  • 4 replies
  • 177 views
  • 1 like
  • 2 in conversation