From d96125c3cf0cb3e76da8aab5d53e889929ee959e Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Tue, 5 Jan 2021 17:14:03 +0000 Subject: [PATCH] fix: mv_jobwaitfor --- all.sas | 16 ++++++++++------ viya/mv_jobwaitfor.sas | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/all.sas b/all.sas index d49bae5..b41affe 100644 --- a/all.sas +++ b/all.sas @@ -12865,18 +12865,18 @@ libname &libref; @param [in] access_token_var= The global macro variable to contain the access token @param [in] grant_type= valid values: - * password - * authorization_code - * detect - will check if access_token exists, if not will use sas_services if - a SASStudioV session else authorization_code. Default option. - * sas_services - will use oauth_bearer=sas_services + - password + - authorization_code + - detect - will check if access_token exists, if not will use sas_services if + a SASStudioV session else authorization_code. Default option. + - sas_services - will use oauth_bearer=sas_services @param [in] inds= The input dataset containing the list of job uris, in the following format: `/jobExecution/jobs/&JOBID./state` and the corresponding job name. The uri should be in a `uri` variable, and the job path/name should be in a `_program` variable. @param [out] outds= The output dataset containing the list of states by job - (default=mv_jobexecute) + (default=work.mv_jobexecute) @version VIYA V.03.04 @@ -12922,6 +12922,10 @@ libname &libref; ,mac=&sysmacroname ,msg=%str(The URI variable was not found in the input dataset(&inds)) ) +%mp_abort(iftrue=(%mf_existvar(&inds,_program)=0) + ,mac=&sysmacroname + ,msg=%str(The _PROGRAM variable was not found in the input dataset(&inds)) +) %if %mf_nobs(&inds)=0 %then %do; %put NOTE: Zero observations in &inds, &sysmacroname will now exit; diff --git a/viya/mv_jobwaitfor.sas b/viya/mv_jobwaitfor.sas index 582b6b4..8e3248f 100644 --- a/viya/mv_jobwaitfor.sas +++ b/viya/mv_jobwaitfor.sas @@ -59,18 +59,18 @@ @param [in] access_token_var= The global macro variable to contain the access token @param [in] grant_type= valid values: - * password - * authorization_code - * detect - will check if access_token exists, if not will use sas_services if - a SASStudioV session else authorization_code. Default option. - * sas_services - will use oauth_bearer=sas_services + - password + - authorization_code + - detect - will check if access_token exists, if not will use sas_services if + a SASStudioV session else authorization_code. Default option. + - sas_services - will use oauth_bearer=sas_services @param [in] inds= The input dataset containing the list of job uris, in the following format: `/jobExecution/jobs/&JOBID./state` and the corresponding job name. The uri should be in a `uri` variable, and the job path/name should be in a `_program` variable. @param [out] outds= The output dataset containing the list of states by job - (default=mv_jobexecute) + (default=work.mv_jobexecute) @version VIYA V.03.04 @@ -116,6 +116,10 @@ ,mac=&sysmacroname ,msg=%str(The URI variable was not found in the input dataset(&inds)) ) +%mp_abort(iftrue=(%mf_existvar(&inds,_program)=0) + ,mac=&sysmacroname + ,msg=%str(The _PROGRAM variable was not found in the input dataset(&inds)) +) %if %mf_nobs(&inds)=0 %then %do; %put NOTE: Zero observations in &inds, &sysmacroname will now exit;