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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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