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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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