I tried all four options with no success: sas.submit("""
options dlcreatedir;
libname results "$HOME/results";
libname results clear;
""")
sas.submit("""
options dlcreatedir;
libname results "~/results";
libname results clear;
""")
sas.submit("""
options dlcreatedir;
libname results "/home/&sysusername./results";
libname results clear;
""")
sas.submit("""
options dlcreatedir;
libname results "/home/U59923716/results";
libname results clear;
""") When I execute this Python code, no results folder shows up: # List directories in homefolder:
dl = sas.dirlist(sas.workpath)
for i in dl:
print(i) Is sas.workpath the same as the home folder in which we created the results folder? But leaving this aside, as said, I could get the macro partially running by using sas.workpath to create a results folder, instead of the home folder. Also, I scanned the code in the macro you reference and I didn't see anything that would assign the senspred macro variable. No call symput or let statements that reference it. It seems to be a variable in some output data, but never stored in a macro variable. If that's the case, then the symget call wouldn't yield anything. OK, but even if I try to retrieve other macro variables that do get assigned a value, like 'tp', 'cinterval', I get the same results (ampersand added before the variable but not the value of the variable): res = sas.symget("cinterval")
Python output:
&cinterval
res = sas.symget("tp")
Python output:
&tp In addition, I get the beneath error in the log file: anyone an idea on how to resolve this? I suppose this is the error because of which the macro doesn't make it to the end: ****************************** CREATE WORD OUTPUT FOR RESULTS ****************************** 5450 "^S={outputwidth=100% just=l font_size=3} Data: 5450 ! "/saswork/SAS_work7B650001B98F_odaws02-euw1.oda.sas.com/SAS_workCAA40001B98F_odaws02-euw1.oda.sas.com/test.csv" _ 22 200 ERROR 22-322: Syntax error, expecting one of the following: ;, ANCHOR, AUTHOR, BASE, BODY, BOOKMARK, BOX_SIZING, CHARSET, CLOSE, COLUMNS, CONTENTS, CSSSTYLE, DATAPANEL, DOM, DPI, ENCODING, FILE, FONTSCALE, GFOOTNOTE, GTITLE, HOST, IMAGE_DPI, KEEPN, LSTPIPE, NEWFILE, NOCONTENTS, NOGFOOTNOTE, NOGTITLE, NOKEEPN, NOLSTPIPE, NOOUTLINE, NOTRKEEP, OPERATOR, OUTLINE, PACKAGE, PATH, RECORD_SEPARATOR, SAS, SASDATE, SGE, STARTPAGE, STYLE, TEXT, TITLE, TRANTAB, TRKEEP. thanks!
... View more