mirror of
https://github.com/sasjs/core.git
synced 2026-01-14 03:50:06 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d6edf5566 | ||
|
|
41a24677f5 | ||
|
|
e7d8d8ffb3 |
@@ -6,7 +6,7 @@
|
|||||||
"hasMacroParentheses": true,
|
"hasMacroParentheses": true,
|
||||||
"noNestedMacros": false,
|
"noNestedMacros": false,
|
||||||
"noSpacesInFileNames": true,
|
"noSpacesInFileNames": true,
|
||||||
"maxLineLength": 135,
|
"maxLineLength": 230,
|
||||||
"lowerCaseFileNames": true,
|
"lowerCaseFileNames": true,
|
||||||
"noTabIndentation": true,
|
"noTabIndentation": true,
|
||||||
"indentationMultiple": 2
|
"indentationMultiple": 2
|
||||||
|
|||||||
6
all.sas
6
all.sas
@@ -12800,6 +12800,9 @@ run;
|
|||||||
@li mf_abort.sas
|
@li mf_abort.sas
|
||||||
@li mf_getuniquefileref.sas
|
@li mf_getuniquefileref.sas
|
||||||
|
|
||||||
|
<h4> Related Macros </h4>
|
||||||
|
@li mfv_existfolder.sas
|
||||||
|
|
||||||
@version 3.5
|
@version 3.5
|
||||||
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
||||||
**/
|
**/
|
||||||
@@ -12847,6 +12850,9 @@ run;
|
|||||||
@li mf_abort.sas
|
@li mf_abort.sas
|
||||||
@li mf_getuniquefileref.sas
|
@li mf_getuniquefileref.sas
|
||||||
|
|
||||||
|
<h4> Related Macros </h4>
|
||||||
|
@li mfv_existfile.sas
|
||||||
|
|
||||||
@version 3.5
|
@version 3.5
|
||||||
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
||||||
**/
|
**/
|
||||||
|
|||||||
7
main.dox
7
main.dox
@@ -42,6 +42,13 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*! \dir Tests
|
||||||
|
* \brief SASjs Tests
|
||||||
|
* \details These folders contain the macro tests. They are first compiled
|
||||||
|
and deployed (sasjs cbd) then executed (sasjs test).
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
/*! \dir viya
|
/*! \dir viya
|
||||||
* \brief Viya macros
|
* \brief Viya macros
|
||||||
* \details These macros have the following attributes:
|
* \details These macros have the following attributes:
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
@li mf_abort.sas
|
@li mf_abort.sas
|
||||||
@li mf_getuniquefileref.sas
|
@li mf_getuniquefileref.sas
|
||||||
|
|
||||||
|
<h4> Related Macros </h4>
|
||||||
|
@li mfv_existfolder.sas
|
||||||
|
|
||||||
@version 3.5
|
@version 3.5
|
||||||
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
@li mf_abort.sas
|
@li mf_abort.sas
|
||||||
@li mf_getuniquefileref.sas
|
@li mf_getuniquefileref.sas
|
||||||
|
|
||||||
|
<h4> Related Macros </h4>
|
||||||
|
@li mfv_existfile.sas
|
||||||
|
|
||||||
@version 3.5
|
@version 3.5
|
||||||
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -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