1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-15 16:14:36 +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

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;