+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions all.sas
Original file line number Diff line number Diff line change
Expand Up @@ -11943,7 +11943,7 @@ data _null_;
run;

/* END */
*%put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) seconds to run;
/* %put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) secs to run; */

%mend mp_replace;
/**
Expand Down Expand Up @@ -24098,12 +24098,14 @@ run;
msg=Cannot enter mfv_existfolder.sas with syscc=&syscc
)

%local fref rc;
%local fref rc var;
%let fref=%mf_getuniquefileref();

%if %sysfunc(filename(fref,,filesrvc,folderPath="&path"))=0 %then %do;
1
%let var=_FILESRVC_&fref._URI;
%let rc=%sysfunc(filename(fref));
%symdel &var;
%end;
%else %do;
0
Expand Down Expand Up @@ -24461,6 +24463,11 @@ run;
,mac=MV_CREATEFILE
,msg=%str(File &path/&name already exists and force=&force)
)
%mp_abort(
iftrue=(&syscc ne 0),
mac=MV_CREATEFILE182
msg=syscc=&syscc after mfv_getpathuri
)

%if %mf_isblank(&fileuri)=0 and &force=YES %then %do;
proc http method="DELETE" url="&base_uri&fileuri" &oauth_bearer;
Expand Down Expand Up @@ -24530,8 +24537,8 @@ data &outds;
end;
run;

%put &sysmacroname: &name created at %mfv_getpathuri(&path/&name);%put;
%put &base_uri/SASJobExecution?_file=&path/&name;%put;
%put &sysmacroname: %trim(&base_uri)%mfv_getpathuri(&path/&name);
%put /SASJobExecution?_file=&path/&name;%put;

%if &mdebug=0 %then %do;
/* clear refs */
Expand Down Expand Up @@ -24664,7 +24671,7 @@ options noquotelenmax;
%if &SYS_PROCHTTP_STATUS_CODE=401 %then %do;
/* relates to: https://github.com/sasjs/core/issues/400 */
%put 401 thrown in &sysmacroname;
%put sleeping: %sysfunc(sleep(10,1)) - will try once more;
%put sleeping: %sysfunc(sleep(12,1)) secs - will try again;
proc http method='GET' out=&fname1 &oauth_bearer
url="&base_uri/folders/folders/@item?path=&newpath";
%if &grant_type=authorization_code %then %do;
Expand Down Expand Up @@ -24728,7 +24735,7 @@ options noquotelenmax;
'Content-Type'='application/vnd.sas.content.folder+json'
'Accept'='application/vnd.sas.content.folder+json';
run;
%if &SYS_PROCHTTP_STATUS_CODE ne 200 %then %do;
%if &SYS_PROCHTTP_STATUS_CODE ne 201 %then %do;
%put &=SYS_PROCHTTP_STATUS_CODE &=SYS_PROCHTTP_STATUS_PHRASE;
%end;
%mp_abort(iftrue=(&SYS_PROCHTTP_STATUS_CODE ne 201)
Expand Down
2 changes: 1 addition & 1 deletion base/mp_replace.sas
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ data _null_;
run;

/* END */
*%put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) seconds to run;
/* %put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) secs to run; */

%mend mp_replace;
4 changes: 3 additions & 1 deletion viya/mfv_existfolder.sas
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
msg=Cannot enter mfv_existfolder.sas with syscc=&syscc
)

%local fref rc;
%local fref rc var;
%let fref=%mf_getuniquefileref();

%if %sysfunc(filename(fref,,filesrvc,folderPath="&path"))=0 %then %do;
1
%let var=_FILESRVC_&fref._URI;
%let rc=%sysfunc(filename(fref));
%symdel &var;
%end;
%else %do;
0
Expand Down
9 changes: 7 additions & 2 deletions viya/mv_createfile.sas
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ run;
,mac=MV_CREATEFILE
,msg=%str(File &path/&name already exists and force=&force)
)
%mp_abort(
iftrue=(&syscc ne 0),
mac=MV_CREATEFILE182
msg=syscc=&syscc after mfv_getpathuri
)

%if %mf_isblank(&fileuri)=0 and &force=YES %then %do;
proc http method="DELETE" url="&base_uri&fileuri" &oauth_bearer;
Expand Down Expand Up @@ -246,8 +251,8 @@ data &outds;
end;
run;

%put &sysmacroname: &name created at %mfv_getpathuri(&path/&name);%put;
%put &base_uri/SASJobExecution?_file=&path/&name;%put;
%put &sysmacroname: %trim(&base_uri)%mfv_getpathuri(&path/&name);
%put /SASJobExecution?_file=&path/&name;%put;

%if &mdebug=0 %then %do;
/* clear refs */
Expand Down
4 changes: 2 additions & 2 deletions viya/mv_createfolder.sas
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ options noquotelenmax;
%if &SYS_PROCHTTP_STATUS_CODE=401 %then %do;
/* relates to: https://github.com/sasjs/core/issues/400 */
%put 401 thrown in &sysmacroname;
%put sleeping: %sysfunc(sleep(10,1)) - will try once more;
%put sleeping: %sysfunc(sleep(12,1)) secs - will try again;
proc http method='GET' out=&fname1 &oauth_bearer
url="&base_uri/folders/folders/@item?path=&newpath";
%if &grant_type=authorization_code %then %do;
Expand Down Expand Up @@ -181,7 +181,7 @@ options noquotelenmax;
'Content-Type'='application/vnd.sas.content.folder+json'
'Accept'='application/vnd.sas.content.folder+json';
run;
%if &SYS_PROCHTTP_STATUS_CODE ne 200 %then %do;
%if &SYS_PROCHTTP_STATUS_CODE ne 201 %then %do;
%put &=SYS_PROCHTTP_STATUS_CODE &=SYS_PROCHTTP_STATUS_PHRASE;
%end;
%mp_abort(iftrue=(&SYS_PROCHTTP_STATUS_CODE ne 201)
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载