1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-11 06:24:35 +00:00

fix: ensuring ms_getfile works on specific installs

This commit is contained in:
munja
2022-03-29 18:08:24 +01:00
parent f4982c85ca
commit edfa9ecc07
4 changed files with 25 additions and 7 deletions

15
all.sas
View File

@@ -3202,7 +3202,7 @@ run;
proc compare
base=&scopeds(where=(upcase(name) not in (%mf_getquotedstr(&ilist))))
compare=&ds;
compare=&ds noprint;
run;
%if &sysinfo=0 %then %do;
@@ -19017,6 +19017,9 @@ run;
@param [out] outref= (msgetfil) The fileref to contain the file.
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
<h4> SAS Macros </h4>
@li mf_getuniquefileref.sas
@li mf_getuniquename.sas
**/
@@ -19025,15 +19028,21 @@ run;
,mdebug=0
);
filename &outref temp;
/* use the recfm in a separate fileref to avoid issues with subsequent reads */
%local binaryfref floc;
%let binaryfref=%mf_getuniquefileref();
%let floc=%sysfunc(pathname(work))/%mf_getuniquename().txt;
filename &outref "&floc";
filename &binaryfref "&floc" recfm=n;
proc http method='GET' out=&outref
proc http method='GET' out=&binaryfref
url="&_sasjs_apiserverurl/SASjsApi/drive/file?_filePath=&driveloc";
%if &mdebug=1 %then %do;
debug level=2;
%end;
run;
filename &binaryfref clear;
%mend ms_getfile;
/**

View File

@@ -106,7 +106,7 @@
proc compare
base=&scopeds(where=(upcase(name) not in (%mf_getquotedstr(&ilist))))
compare=&ds;
compare=&ds noprint;
run;
%if &sysinfo=0 %then %do;

View File

@@ -71,7 +71,7 @@
},
{
"name": "server",
"serverUrl": " ",
"serverUrl": "https://sas.analytium.co.uk:5000",
"serverType": "SASJS",
"httpsAgentOptions": {
"allowInsecureRequests": false

View File

@@ -11,6 +11,9 @@
@param [out] outref= (msgetfil) The fileref to contain the file.
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
<h4> SAS Macros </h4>
@li mf_getuniquefileref.sas
@li mf_getuniquename.sas
**/
@@ -19,14 +22,20 @@
,mdebug=0
);
filename &outref temp;
/* use the recfm in a separate fileref to avoid issues with subsequent reads */
%local binaryfref floc;
%let binaryfref=%mf_getuniquefileref();
%let floc=%sysfunc(pathname(work))/%mf_getuniquename().txt;
filename &outref "&floc";
filename &binaryfref "&floc" recfm=n;
proc http method='GET' out=&outref
proc http method='GET' out=&binaryfref
url="&_sasjs_apiserverurl/SASjsApi/drive/file?_filePath=&driveloc";
%if &mdebug=1 %then %do;
debug level=2;
%end;
run;
filename &binaryfref clear;
%mend ms_getfile;