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 @sasjslint {"maxLineLength": 123, "noXcmd": false}
23**/
24
25%macro mmx_deletemetafolder(loc=,user=,pass=);
26
27%local host port path connx_string;
28%let host=%sysfunc(getoption(metaserver));
29%let port=%sysfunc(getoption(metaport));
30%let path=%mf_loc(POF)/tools;
31
32%let connx_string= -host &host -port &port -user '&user' -password '&pass';
33/* remove directory */
34data _null_;
35 infile " &path/sas-delete-objects &connx_string ""&loc"" -deleteContents 2>&1"
36 pipe lrecl=10000;
37 input;
38 putlog _infile_;
39run;
40
41%mend mmx_deletemetafolder;