BookmarkSubscribeRSS Feed
THALLA_REDDY
Obsidian | Level 7

Hi there,

we have some user groups defined in the metadata library using the SMC 9.4_M7 version. Now after creating these initial names we came to know that there are some special characters in the names like ;'&/- etc., When checked some solutions in SAS Community to rename them got some inputs from this thread => https://communities.sas.com/t5/Administration-and-Deployment/Is-it-possible-to-rename-the-metadata-d.... After trying from the below code we are able to rename few USER Groups where we don't have apostrophe but if we have any quote (single quote or apostrophe) in the name then getting the error.

Example of my USER Group name: 01234-ABC'd Inc 


Now we want this User Group to be renamed as: 01234-ABCd Inc

 

Below is the code we tried: 

data changenames;
  length oldname newname $256.;
  infile datalines dsd;  
  input oldname $ newname $;
  datalines;
  01234-ABC'd Inc, ABCd Inc
;
run;

data identitygroups(keep=uri oldname newname rc);
  length uri $256;  nobj=1; n=1;
  set changenames;
  do while(nobj >= 0);
    nobj=metadata_getnobj(cats("omsobj:IdentityGroup?@Name='",oldname,"'"),n,uri);
    rc=metadata_setattr(uri,"Name",newname); 
    n=n+1;
  end;
run;

Any help on this requirement is highly appreciated.

 

thanks in advance.

4 REPLIES 4
SASKiwi
PROC Star

Is deleting and recreating them possible? Have you tried this in SMC?

 

It is probably worth checking with SAS Tech Support on this.

THALLA_REDDY
Obsidian | Level 7

Yes, I have tried in SMC but metadata is not getting reflected eventhough I am seeing the name in SMC is changed. It's strange for me.

Sajid01
Meteorite | Level 14

Under similar scenario, i would create new group, backup the metadata and then delete the old group.
Make sure you have all the users in the group as well as the access controls replicated.

THALLA_REDDY
Obsidian | Level 7
thanks, I will check and try based on the possibilities

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1284 views
  • 0 likes
  • 3 in conversation