我正在尝试直接从github网址运行SAS文件(包含%宏)。我发现this post on blogs.sas.com似乎给了我解决方案。不幸的是,我无法让它发挥作用。
我要运行的.sas文件存储here on github。
filename _inbox "%sysfunc(getoption(work))/Macro H2_Piepho.sas";
proc http method="get" url="https://github.com/SchmidtPaul/HeritabilityScripts/blob/master/SAS/MACRO%20H2_Piepho.sas"
out=_inbox;
run;
%Include _inbox;
filename _inbox clear;
8418 %Include _inbox;
8425 +<!DOCTYPE html>
-
180
WARNING: Apparent symbolic reference AMP not resolved.
WARNING: Apparent symbolic reference AMP not resolved.
WARNING: Apparent symbolic reference LT not resolved.
WARNING: Apparent symbolic reference GT not resolved.
WARNING: Apparent symbolic reference LT not resolved.
WARNING: Apparent symbolic reference GT not resolved.
WARNING: Apparent symbolic reference AMP not resolved.
WARNING: The quoted string currently being processed has become more than 262 characters long.
You might have unbalanced quotation marks.
WARNING: The quoted string currently being processed has become more than 262 characters long.
You might have unbalanced quotation marks.
ERROR: The token currently being processed is in an incomplete state. You might have an
unbalanced single quoted string or a token exceeding the maximum length of 65535
characters.
9661 + <li><a
9661!+href="/SchmidtPaul/HeritabilityScripts/blame/7a18272000de0cfede86ae70a012ef581e95be3d/SAS
9661!+/MACRO%20H2_Piepho.sas" class="dropdown-item js-update-url-with-hash"
------
49
9661!+id="js-view-git-blame">View git blame</a></li>
ERROR 180-322: Statement is not valid or it is used out of proper order.
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS
release. Inserting white space between a quoted string and the succeeding
identifier is recommended.
9662 + <li><a href="/SchmidtPaul/HeritabilityScripts/issues/new" class="dropdown-item"
------
49
9662!+ id="js-new-issue">Open new issue</a></li>
9671 + <button type="button" data-facebox="#jump-to-line" data-facebox-class="linejump"
----------------------
---------------
----------------------------------
49 49
49
9671!+data-hotkey="l" class="d-none">Jump to Line</button>
WARNING: Apparent symbolic reference HELLIP not resolved.
WARNING: Apparent symbolic reference COPY not resolved.
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS
release. Inserting white space between a quoted string and the succeeding
identifier is recommended.
提前感谢您的帮助!
答案 0 :(得分:2)
我发现了问题。我需要使用SAS文件的RAW link。
答案 1 :(得分:2)
您可以使用proc http
语句中的url
access method,而无需使用filename
,例如:
filename bizarro url
"https://raw.githubusercontent.com/allanbowe/BizarroBall/master/bizarroball.sas";
%inc bizarro;