From f160ebe7053d613621ea5d35238594a5d710a148 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Tue, 1 Jun 2021 18:01:01 +0300 Subject: [PATCH] chore: updating all.sas from previous pushes --- all.sas | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/all.sas b/all.sas index 3833e6f..dd3e233 100644 --- a/all.sas +++ b/all.sas @@ -67,7 +67,8 @@ options noquotelenmax; %if %sysfunc(exist(&libds)) ne 1 & %sysfunc(exist(&libds,VIEW)) ne 1 %then 0; %else 1; -%mend;/** +%mend mf_existds; +/** @file @brief Checks whether a feature exists @details Check to see if a feature is supported in your environment. @@ -975,7 +976,8 @@ options noquotelenmax; %let rc=%sysfunc(close(&dsid)); %end; %else %do; - %put unable to open &libds (rc=&dsid); + %put &sysmacroname: Unable to open &libds (rc=&dsid); + %put &sysmacroname: SYSMSG= %sysfunc(sysmsg()); %let rc=%sysfunc(close(&dsid)); %end; &outvar @@ -12896,6 +12898,10 @@ run; @param [in] path= The parent folder in which to create the file @param [in] name= The name of the file to be created @param [in] inref= The fileref pointing to the file to be uploaded + @param [in] contentdisp= (inline) Content Disposition. Example values: + @li inline + @li attachment + @param [in] access_token_var= The global macro variable to contain the access token, if using authorization_code grant type. @param [in] grant_type= (sas_services) Valid values are: @@ -12920,6 +12926,7 @@ run; %macro mv_createfile(path= ,name= ,inref= + ,contentdisp=inline ,access_token_var=ACCESS_TOKEN ,grant_type=sas_services ,mdebug=0 @@ -12967,12 +12974,23 @@ run; /* create file with relevant options */ %local fref; %let fref=%mf_getuniquefileref(); -filename &fref filesrvc folderPath="&path" filename="&name"; +filename &fref filesrvc + folderPath="&path" + filename="&name" + cdisp="&contentdisp"; %mp_binarycopy(inref=&inref, outref=&fref) filename &fref clear; +%local base_uri; /* location of rest apis */ +%let base_uri=%mf_getplatform(VIYARESTAPI); + +%put &sysmacroname: File &name successfully created in &path; +%put &sysmacroname:;%put; +%put &base_uri/SASJobExecution?_file=&path/&name;%put; +%put &sysmacroname:; + %mend mv_createfile;/** @file mv_createfolder.sas @brief Creates a viya folder if that folder does not already exist