mirror of
https://github.com/sasjs/core.git
synced 2026-01-12 11:00:05 +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
|
||||||
|
|||||||
16
all.sas
16
all.sas
@@ -8810,7 +8810,7 @@ Usage:
|
|||||||
@param code=(ft15f001) Space seperated fileref(s) of the actual code to be
|
@param code=(ft15f001) Space seperated fileref(s) of the actual code to be
|
||||||
added
|
added
|
||||||
@param server=(SASApp) The server which will run the STP. Server name or uri
|
@param server=(SASApp) The server which will run the STP. Server name or uri
|
||||||
is fine.
|
is fine.
|
||||||
@param mDebug=(0) set to 1 to show debug messages in the log
|
@param mDebug=(0) set to 1 to show debug messages in the log
|
||||||
@param replace=(YES) select NO to avoid replacing an existing service in that
|
@param replace=(YES) select NO to avoid replacing an existing service in that
|
||||||
location
|
location
|
||||||
@@ -12791,8 +12791,8 @@ run;
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
%put %mfv_existfile(/does/exist.txt);
|
%put %mfv_existfile(/does/exist.txt);
|
||||||
%put %mfv_existfile(/does/not/exist.txt);
|
%put %mfv_existfile(/does/not/exist.txt);
|
||||||
|
|
||||||
@param filepath The full path to the file on SAS drive (eg /Public/myfile.txt)
|
@param filepath The full path to the file on SAS drive (eg /Public/myfile.txt)
|
||||||
|
|
||||||
@@ -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/)
|
||||||
**/
|
**/
|
||||||
@@ -12838,8 +12841,8 @@ run;
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
%put %mfv_existfolder(/does/exist);
|
%put %mfv_existfolder(/does/exist);
|
||||||
%put %mfv_existfolder(/does/not/exist);
|
%put %mfv_existfolder(/does/not/exist);
|
||||||
|
|
||||||
@param path The path to the folder on SAS drive
|
@param path The path to the folder on SAS drive
|
||||||
|
|
||||||
@@ -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:
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Usage:
|
|||||||
@param code=(ft15f001) Space seperated fileref(s) of the actual code to be
|
@param code=(ft15f001) Space seperated fileref(s) of the actual code to be
|
||||||
added
|
added
|
||||||
@param server=(SASApp) The server which will run the STP. Server name or uri
|
@param server=(SASApp) The server which will run the STP. Server name or uri
|
||||||
is fine.
|
is fine.
|
||||||
@param mDebug=(0) set to 1 to show debug messages in the log
|
@param mDebug=(0) set to 1 to show debug messages in the log
|
||||||
@param replace=(YES) select NO to avoid replacing an existing service in that
|
@param replace=(YES) select NO to avoid replacing an existing service in that
|
||||||
location
|
location
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
%put %mfv_existfile(/does/exist.txt);
|
%put %mfv_existfile(/does/exist.txt);
|
||||||
%put %mfv_existfile(/does/not/exist.txt);
|
%put %mfv_existfile(/does/not/exist.txt);
|
||||||
|
|
||||||
@param filepath The full path to the file on SAS drive (eg /Public/myfile.txt)
|
@param filepath The full path to the file on SAS drive (eg /Public/myfile.txt)
|
||||||
|
|
||||||
@@ -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/)
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
%put %mfv_existfolder(/does/exist);
|
%put %mfv_existfolder(/does/exist);
|
||||||
%put %mfv_existfolder(/does/not/exist);
|
%put %mfv_existfolder(/does/not/exist);
|
||||||
|
|
||||||
@param path The path to the folder on SAS drive
|
@param path The path to the folder on SAS drive
|
||||||
|
|
||||||
@@ -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