<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAS code to add users and groups to a group? in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200808#M2835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linus is right, so yes it is doable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the User Import Macros (of which &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;%mduimplb is the one which does the loading of data from 'canonical' - i.e pre-defined format - tables into metadata), to make users and groups members of a group, even if you're not using it to add/update/delete any users or groups themselves. You will need to populate one of these canonical tables called grpmems, which has two columns: grpkeyid memkeyid. The first, grpkeyid is the ID for the group as it was loaded into metadata - the value depends on how the group was populated. The second column, &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;memkeyid, can be a user keyid, or a group keyid. The User Import Macros are documented &lt;A href="http://support.sas.com/documentation/cdl/en/bisecag/67045/HTML/default/viewer.htm#p1ar98lajfgm4jn1wa1h6e19jjre.htm"&gt;here&lt;/A&gt;, and the canonical tables illustrated &lt;A href="http://support.sas.com/documentation/cdl/en/bisecag/67045/HTML/default/viewer.htm#p1o31lg0trorn8n1rketxxe1jbr1.htm"&gt;here&lt;/A&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2015 14:32:19 GMT</pubDate>
    <dc:creator>DavidStern</dc:creator>
    <dc:date>2015-08-19T14:32:19Z</dc:date>
    <item>
      <title>SAS code to add users and groups to a group?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200805#M2832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I have a piece of code that lists all the objects (user or a group) that is a a member of another group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*Connect to the metadata server.&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options metaserver="biserver.whatever.com"&lt;/P&gt;&lt;P&gt;&amp;nbsp; metaport=8561&lt;/P&gt;&lt;P&gt;&amp;nbsp; metauser="sasadm@saspw"&lt;/P&gt;&lt;P&gt;&amp;nbsp; metapass="password"&lt;/P&gt;&lt;P&gt;&amp;nbsp; metarepository="Foundation";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mduextr(libref=work)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table work.sasmembership as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct name 'name' as name , memName 'memName' as memName,'GROUP'&lt;/P&gt;&lt;P&gt;&amp;nbsp; from work.Groupmemgroups_info&lt;/P&gt;&lt;P&gt;&amp;nbsp; where substr(name,1,1) in ('p','v','f','w') or name in ('Report Developer','sqlserver','Report Viewer')&lt;/P&gt;&lt;P&gt;&amp;nbsp; UNION&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct name 'name' as name , memName 'memName' as memName,'USER'&lt;/P&gt;&lt;P&gt;&amp;nbsp; from work.Groupmempersons_info&lt;/P&gt;&lt;P&gt;&amp;nbsp; where substr(name,1,1) in ('p','v','f','w') or name in ('Report Developer','sqlserver','Report Viewer');&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i want now is to be able to go through that group and isue a metadata command to add the member (be it a group or user) to the group&lt;/P&gt;&lt;P&gt;on another server is there a proc metadata command to add a group or user to a group?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;command bla addtogroup jeff destinationgroupname&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;command bla addtogroup group1 destinationgroup&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 17:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200805#M2832</guid>
      <dc:creator>merrittr</dc:creator>
      <dc:date>2015-08-17T17:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code to add users and groups to a group?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200806#M2833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%mduimplb?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 14:11:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200806#M2833</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-08-19T14:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code to add users and groups to a group?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200807#M2834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that seems to add users and groups to METADATA but it doesn't add users to groups or groups to groups correct?&lt;/P&gt;&lt;P&gt;I have all my users added and all my groups added via %mduimplb&amp;nbsp; now I need to populate the groups based on a query to an older server&lt;/P&gt;&lt;P&gt;that had all the users added to the groups manually. Is that doable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 14:17:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200807#M2834</guid>
      <dc:creator>merrittr</dc:creator>
      <dc:date>2015-08-19T14:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code to add users and groups to a group?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200808#M2835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linus is right, so yes it is doable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the User Import Macros (of which &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;%mduimplb is the one which does the loading of data from 'canonical' - i.e pre-defined format - tables into metadata), to make users and groups members of a group, even if you're not using it to add/update/delete any users or groups themselves. You will need to populate one of these canonical tables called grpmems, which has two columns: grpkeyid memkeyid. The first, grpkeyid is the ID for the group as it was loaded into metadata - the value depends on how the group was populated. The second column, &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;memkeyid, can be a user keyid, or a group keyid. The User Import Macros are documented &lt;A href="http://support.sas.com/documentation/cdl/en/bisecag/67045/HTML/default/viewer.htm#p1ar98lajfgm4jn1wa1h6e19jjre.htm"&gt;here&lt;/A&gt;, and the canonical tables illustrated &lt;A href="http://support.sas.com/documentation/cdl/en/bisecag/67045/HTML/default/viewer.htm#p1o31lg0trorn8n1rketxxe1jbr1.htm"&gt;here&lt;/A&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 14:32:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200808#M2835</guid>
      <dc:creator>DavidStern</dc:creator>
      <dc:date>2015-08-19T14:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code to add users and groups to a group?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200809#M2836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah gotcha that makes sense thanks guys!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 19:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-code-to-add-users-and-groups-to-a-group/m-p/200809#M2836</guid>
      <dc:creator>merrittr</dc:creator>
      <dc:date>2015-08-19T19:05:21Z</dc:date>
    </item>
  </channel>
</rss>

