将元用户添加到 sas 中的元组 [英] adding a meta user to a meta group in sas

查看:43
本文介绍了将元用户添加到 sas 中的元组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 SAS 9.4 平台中的 SAS EGRC 6.1 中有大约 600 个元用户.

I've around 600 meta users in SAS EGRC 6.1 in the platform in SAS 9.4.

我想将这些用户添加到元组.为此,我使用下面的代码

I want to add those users to a meta-group. for this, I'm using code below

libname current '/tmp/temp1';   /* for the current metadata */

libname addgrps '/tmp/temp2';  /* current augmented with the changes */

libname updates '/tmp/temp3';  /* for the updates created by the mducmp macro */


options metaserver=abc

        metaport=8561

        metauser='sasadm@saspw'

        metapass='xyz123'

        metaprotocol=bridge

        metarepository=foundation;


%mduextr(libref=current);


proc copy in = current out = addgrps;
/*copy the current data to the directory for the target */
run;

data investigators_1;
set current.person;
where name in ('5806036');
rename objid = memkeyid;
keep objid;
run;


data investigator_group_1;
set current.group_info;
where name='Enterprise GRC: Incident Investigation';
rename id = grpkeyid;
keep id;
run;


proc sql;
create table grpmems as
select * from investigators_1, investigator_group_1;
quit;


proc append base = addgrps.grpmems data = grpmems;
run;


/* use the mducmp macro to create the updates data */
%mducmp(master=addgrps, target=current, change=updates)

/* validate the change data sets */
%mduchgv(change=updates, target=current, temp=work, errorsds=work.mduchgverrors)

/* apply the updates */
%mduchgl(change=updates);

对于最后的更新,我尝试了 %mduchgl 和 %mduchglb,但两者都无法获得想要的结果.我用一位用户对其进行了测试.

for the final updated I tried both %mduchgl and %mduchglb but with both, I'm not able to get the desired results. I test it with one user.

使用 %mduchgl 我得到以下错误

with %mduchgl I get the below error

The symbolic reference for A52PDIUF.$A52PDIUF.AP0000NI did not resolve.

使用 %mduchglb 我得到以下错误

with %mduchglb I get the below error

The object reference to Person was requested without an identifier.
Errors returned from Proc Metadata prevented objects from being Added, Updated, or Deleted.  Table: work.mduchglb_failedobjs 
identifies 1 such objects.  Consult the SAS Log for the specific Metadata Server errors returned.

关于如何解决错误的任何建议或我应该尝试实现的其他方法.

Any suggestions that how can I resolve the error or another approach that I should try to achieve this.

谢谢.

推荐答案

我认为您不应该修改这些数据集!使用 proc metadata(或作为最后手段的数据步骤函数),您需要实现的一切都应该是可能的.

I don't think you should ever modify those datasets! Everything you need to achieve should be possible using proc metadata (or data step functions as last resort).

这是一个相关的 SAS 社区 线程.总而言之 - 以下代码段将向用户添加一个组,只要您拥有组/用户 URI:

Here is a relevant SAS Communities thread. To summarise - the following snippet will add a group to a user, so long as you have the group / user URI:

<Person Id="A5NUQPXO.AP00002V">
  <IdentityGroups>
    <IdentityGroup ObjRef="A5NUQPXO.A500001C" />
  </IdentityGroups>
</Person>

更新 - 为了完整起见,我把它变成了一个宏,描述在这里

UPDATE - for completeness, I turned this into a macro, described here

https://core.sasjs.io/mm__adduser2group_8sas.html

这篇关于将元用户添加到 sas 中的元组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆