24%macro mm_getstpinfo(pgm
25 ,outds=work.mm_getstpinfo
30%
if &mDebug=1 %then %let mD=;
32%&mD.put Executing &sysmacroname..sas;
36 length type stp_uri tsuri servercontext value $200
37 StoredProcessConfiguration $1000 sourcecode_first32k $32767;
38 keep path stp_uri sourcecode_first32k StoredProcessConfiguration
40 call missing (of _all_);
41 path=
"&pgm(StoredProcess)";
43 if metadata_pathobj(
"",path,
"StoredProcess",type,stp_uri)>0 then
do;
46 do while (metadata_getnasn(stp_uri,
"Notes",cnt,tsuri)>0);
47 rc1=metadata_getattr(tsuri,
"Name",value);
48 &mD.put tsuri= value=;
49 if value=
"SourceCode" then
do;
50 rc2=metadata_getattr(tsuri,
"StoredText",sourcecode_first32k);
52 else if value=
"Stored Process" then
do;
53 rc3=metadata_getattr(tsuri,
"StoredText",StoredProcessConfiguration);
58 rc4=metadata_getnasn(stp_uri,
"ComputeLocations",1,tsuri);
59 rc5=metadata_getattr(tsuri,
"Name",servercontext);
62 put
'ERR' +(-1)
"OR: could not find " path;