1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-06 17:10:05 +00:00

chore: updating all.sas

This commit is contained in:
github-actions
2025-06-30 16:37:46 +00:00
parent 542039b425
commit b47f31cfe6

44
all.sas
View File

@@ -11943,7 +11943,7 @@ data _null_;
run; run;
/* END */ /* END */
%put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) seconds to run; *%put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) seconds to run;
%mend mp_replace; %mend mp_replace;
/** /**
@@ -24110,6 +24110,11 @@ run;
%let syscc=0; %let syscc=0;
%end; %end;
%mf_abort(
iftrue=(&syscc ne 0),
msg=Cannot leave mfv_existfolder.sas with syscc=&syscc
)
%mend mfv_existfolder;/** %mend mfv_existfolder;/**
@file mfv_existsashdat.sas @file mfv_existsashdat.sas
@brief Checks whether a CAS sashdat dataset exists in persistent storage. @brief Checks whether a CAS sashdat dataset exists in persistent storage.
@@ -24273,6 +24278,10 @@ run;
%let syscc=0; %let syscc=0;
%end; %end;
%mf_abort(
iftrue=(&syscc ne 0),
msg=Cannot leave &sysmacroname with syscc=&syscc
)
%mend mfv_getpathuri;/** %mend mfv_getpathuri;/**
@file @file
@brief Creates a file in SAS Drive using the API method @brief Creates a file in SAS Drive using the API method
@@ -24370,6 +24379,11 @@ run;
%end; %end;
%else %let dbg=*; %else %let dbg=*;
%mp_abort(
iftrue=(&syscc ne 0),
msg=Cannot enter &sysmacroname with syscc=&syscc
)
%local oauth_bearer; %local oauth_bearer;
%if &grant_type=detect %then %do; %if &grant_type=detect %then %do;
%if %symexist(&access_token_var) %then %let grant_type=authorization_code; %if %symexist(&access_token_var) %then %let grant_type=authorization_code;
@@ -24526,6 +24540,11 @@ run;
libname &libref2 clear; libname &libref2 clear;
%end; %end;
%mp_abort(
iftrue=(&syscc ne 0),
msg=Cannot leave &sysmacroname with syscc=&syscc
)
%mend mv_createfile;/** %mend mv_createfile;/**
@file mv_createfolder.sas @file mv_createfolder.sas
@brief Creates a viya folder if that folder does not already exist @brief Creates a viya folder if that folder does not already exist
@@ -24574,6 +24593,11 @@ run;
%end; %end;
%else %let dbg=*; %else %let dbg=*;
%mp_abort(
iftrue=(&syscc ne 0),
msg=Cannot enter &sysmacroname with syscc=&syscc
)
%if %mfv_existfolder(&path)=1 %then %do; %if %mfv_existfolder(&path)=1 %then %do;
%&dbg.put &sysmacroname: &path already exists; %&dbg.put &sysmacroname: &path already exists;
data &outds; data &outds;
@@ -24583,6 +24607,7 @@ run;
run; run;
%return; %return;
%end; %end;
%mp_abort(iftrue=(&syscc ne 0),msg=syscc=&syscc when folder checking)
%local oauth_bearer; %local oauth_bearer;
%if &grant_type=detect %then %do; %if &grant_type=detect %then %do;
@@ -24636,6 +24661,17 @@ options noquotelenmax;
headers "Authorization"="Bearer &&&access_token_var"; headers "Authorization"="Bearer &&&access_token_var";
%end; %end;
run; run;
%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;
proc http method='GET' out=&fname1 &oauth_bearer
url="&base_uri/folders/folders/@item?path=&newpath";
%if &grant_type=authorization_code %then %do;
headers "Authorization"="Bearer &&&access_token_var";
%end;
run;
%end;
%local libref1; %local libref1;
%let libref1=%mf_getuniquelibref(); %let libref1=%mf_getuniquelibref();
libname &libref1 JSON fileref=&fname1; libname &libref1 JSON fileref=&fname1;
@@ -24643,7 +24679,7 @@ options noquotelenmax;
iftrue=( iftrue=(
&SYS_PROCHTTP_STATUS_CODE ne 200 and &SYS_PROCHTTP_STATUS_CODE ne 404 &SYS_PROCHTTP_STATUS_CODE ne 200 and &SYS_PROCHTTP_STATUS_CODE ne 404
) )
,mac=&sysmacroname ,mac=mv_createfolder124
,msg=%str(&SYS_PROCHTTP_STATUS_CODE &SYS_PROCHTTP_STATUS_PHRASE) ,msg=%str(&SYS_PROCHTTP_STATUS_CODE &SYS_PROCHTTP_STATUS_PHRASE)
) )
%if &mdebug=1 %then %do; %if &mdebug=1 %then %do;
@@ -24722,6 +24758,10 @@ options noquotelenmax;
filename &fname1 clear; filename &fname1 clear;
libname &libref1 clear; libname &libref1 clear;
%end; %end;
%mp_abort(
iftrue=(&syscc ne 0),
msg=Cannot leave &sysmacroname with syscc=&syscc
)
%mend mv_createfolder;/** %mend mv_createfolder;/**
@file @file
@brief Creates a Viya Job @brief Creates a Viya Job