Compile a macro from GitHub gist

Accepted Solution Solved
Reply
Contributor
Posts: 43
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
Esteemed Advisor
Posts: 6,646

Re: Compile a macro from GitHub gist

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

View solution in original post


All Replies
Solution
‎03-19-2017 01:17 PM
Esteemed Advisor
Posts: 6,646

Re: Compile a macro from GitHub gist

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
Contributor
Posts: 43

Re: Compile a macro from GitHub gist

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\...\...

 

Esteemed Advisor
Posts: 6,646

Re: Compile a macro from GitHub gist

%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
Contributor
Posts: 43

Re: Compile a macro from GitHub gist

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
  • 144 views
  • 1 like
  • 2 in conversation