Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mmx_deletemetafolder.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Deletes a metadata folder
4 @details Deletes a metadata folder (and contents) using the batch tools, as
5 documented here:
6 https://documentation.sas.com/?docsetId=bisag&docsetTarget=p0zqp8fmgs4o0kn1tt7j8ho829fv.htm&docsetVersion=9.4&locale=en
7
8 Usage:
9
10 %mmx_deletemetafolder(loc=/some/meta/folder,user=sasdemo,pass=mars345)
11
12 <h4> SAS Macros </h4>
13 @li mf_loc.sas
14
15 @param [in] loc= the metadata folder to delete
16 @param [in] user= username
17 @param [in] pass= password
18
19 @version 9.4
20 @author Allan Bowe
21
22**/
23
24%macro mmx_deletemetafolder(loc=,user=,pass=);
25
26%local host port path connx_string;
27%let host=%sysfunc(getoption(metaserver));
28%let port=%sysfunc(getoption(metaport));
29%let path=%mf_loc(POF)/tools;
30
31%let connx_string= -host &host -port &port -user '&user' -password '&pass';
32/* remove directory */
33data _null_;
34 infile " &path/sas-delete-objects &connx_string ""&loc"" -deleteContents 2>&1"
35 pipe lrecl=10000;
36 input;
37 putlog _infile_;
38run;
39
40%mend mmx_deletemetafolder;