I have use the way of metas_setassn's create user-group to metdata server.But when i try to remove the association of group .The log is ok .But use the tool of smc to view .The Group isn't removed.
%global personId groupId operator;
%let personId=A5Q3QDPK.AQ000KIF;
%let groupId=A5Q3QDPK.AQ0008GZ;
%let operator=REMOVE;
*ProcessBody;
/*
* 参数:
* personId :
* groupId :
* operator :
*/
%let server=vm126181;
%let adminUser=sasadm;
%let adminPass=sasadm000;
options metaserver="&server"
metaport=8561
metaprotocol=bridge
metauser="&adminUser"
metapass="&adminPass"
metarepository="Foundation";
option mprint mlogic;
data _null_;
length puri $256. guri $256. rc 8.;
puri = compress("omsobj:Person\&personId");
guri = compress("omsobj:IdentityGroup\&groupId");
put puri=;
put guri=;
rc = metadata_setassn(puri, "IdentityGroups", "&operator", guri);
put rc=;
run;
The result is rc=0;
But use the tool of smc the group isn't removed;
Why
A resulting RC of 0 indicates the metadata_setassn function completed successfully, and I don't see any issue with your syntax. It would be necessary to examine Metadata Server trace logging to determine what is happening on the server.
I tested this process and was able to successfully add and remove a user from a group using the METADATA_SETASSN DATA Step function.
Have you already contacted SAS Technical Support and opened a support track?
I would recommend you continue to work with SAS Technical Support. They can let you know what additional logging they may require to find the root cause of the failure.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to explore data assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.