21%macro mm_updatestpservertype(
32 rc=metadata_pathobj(
"",
"&target",
'StoredProcess',type,uri);
33 call symputx(
'cmtype',type,
'l');
34 call symputx(
'stpuri',uri,
'l');
36%
if &cmtype ne ClassifierMap %then %
do;
37 %put %str(WARN)ING: No Stored Process found at ⌖
42%
if &type=WKS %then %let newtype=Wks;
43%
else %let newtype=Sps;
48 length uri name value $256;
50 do while(metadata_getnasn(
"&stpuri",
"Notes",n,uri)>0);
52 rc=metadata_getattr(uri,
"Name",name);
53 if name=
'Stored Process' then
do;
54 rc = METADATA_SETATTR(uri,
'StoredText'
55 ,
'<?xml version="1.0" encoding="UTF-8"?>'
56 !!
'<StoredProcess><ServerContext LogicalServerType="'!!
"&newtype"
57 !!
'" OtherAllowed="false"/><ResultCapabilities Package="false" '
58 !!
' Streaming="true"/><OutputParameters/></StoredProcess>');
59 if rc=0 then call symputx(
'result',
'SUCCESS');
64%
if &result=SUCCESS %then %put NOTE: SUCCESS: STP &target changed to &type type;
65%
else %put %str(ERR)OR: Issue with &sysmacroname;
67%mend mm_updatestpservertype;