mirror of
https://github.com/sasjs/core.git
synced 2026-01-14 20:10:05 +00:00
feat: additional options for mv_createfile.sas, also a log message to enable file to be easily opened
This commit is contained in:
@@ -17,6 +17,10 @@
|
|||||||
@param [in] path= The parent folder in which to create the file
|
@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] name= The name of the file to be created
|
||||||
@param [in] inref= The fileref pointing to the file to be uploaded
|
@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
|
@param [in] access_token_var= The global macro variable to contain the access
|
||||||
token, if using authorization_code grant type.
|
token, if using authorization_code grant type.
|
||||||
@param [in] grant_type= (sas_services) Valid values are:
|
@param [in] grant_type= (sas_services) Valid values are:
|
||||||
@@ -41,6 +45,7 @@
|
|||||||
%macro mv_createfile(path=
|
%macro mv_createfile(path=
|
||||||
,name=
|
,name=
|
||||||
,inref=
|
,inref=
|
||||||
|
,contentdisp=inline
|
||||||
,access_token_var=ACCESS_TOKEN
|
,access_token_var=ACCESS_TOKEN
|
||||||
,grant_type=sas_services
|
,grant_type=sas_services
|
||||||
,mdebug=0
|
,mdebug=0
|
||||||
@@ -88,10 +93,21 @@
|
|||||||
/* create file with relevant options */
|
/* create file with relevant options */
|
||||||
%local fref;
|
%local fref;
|
||||||
%let fref=%mf_getuniquefileref();
|
%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)
|
%mp_binarycopy(inref=&inref, outref=&fref)
|
||||||
|
|
||||||
filename &fref clear;
|
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;
|
%mend mv_createfile;
|
||||||
Reference in New Issue
Block a user