20%macro mm_deletedocument(
30 rc=metadata_pathobj(
"",
"&target",
'Note',type,uri);
31 call symputx(
'type',type,
'l');
32 call symputx(
'stpuri',uri,
'l');
34%
if &type ne Document %then %
do;
35 %put %str(WARN)ING: No Document found at ⌖
39filename __in temp lrecl=10000;
40filename __out temp lrecl=10000;
43 put
"<DeleteMetadata><Metadata><Document Id='&stpuri'/>";
44 put
"</Metadata><NS>SAS</NS><Flags>268436480</Flags><Options/>";
45 put
"</DeleteMetadata>";
47proc metadata in=__in out=__out verbose;run;
50data _null_;infile __out; input; list; run;
61 call missing (of _all_);
62 rc=metadata_pathobj(
"",
"&target",
'Note',type,uri);
63 call symputx(
'isgone',type,
'l');
65%
if &isgone = Document %then %
do;
66 %put %str(ERR)OR: Document not deleted from ⌖
71%mend mm_deletedocument;