Hi Team,
I am using the below PROC Meta data code for adding / removing the access to user group for a user(colleague), but getting an error due to a special character in the group name.
Code used :
proc metadata in=
"<UpdateMetadata>
<Metadata>
<Person Id=%str(%')&PersonId%str(%')>
<IdentityGroups Function=&FUNC>
<IdentityGroup ObjRef=%str(%')&GroupId%str(%') Name=%str(%')&Group%str(%')/>
</IdentityGroups>
</Person>
</Metadata>
<ReposId>$METAREPOSITORY</ReposId>
<ns>SAS</ns>
<flags>268435456</flags>
<Options/>
</UpdateMetadata>";
run;
Error Snapshot:
Can anyone help me with a solution to fix this ?
thanks in advance
thalla
Looks like one of your user group names includes a quote. You should fix this at source to not contain quotes. Defining user groups containing quotes is just bad practice.
As @SASKiwi says, I think you're only going to get trouble if you allow single quotes in the Group name.
However, maybe as a temporary work around you could try coding a %BQUOTE around the Group name. I still think you may have trouble though down the road. Use at you own risk.
"<UpdateMetadata>
<Metadata>
<Person Id=%str(%')&PersonId%str(%')>
<IdentityGroups Function=&FUNC>
<IdentityGroup ObjRef=%str(%')&GroupId%str(%') Name=%str(%')%BQUOTE(&Group)%str(%')/>
</IdentityGroups>
</Person>
</Metadata>
<ReposId>$METAREPOSITORY</ReposId>
<ns>SAS</ns>
<flags>268435456</flags>
<Options/>
</UpdateMetadata>";
Jim
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: