BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

I wanted to write a sas code to add a group in management console rather than manually adding them. How to do?

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Look at how user/group metadata is synced in the programs

/sashome/SASFoundation/9.4/samples/base/importpw.sas
/sashome/SASFoundation/9.4/samples/base/importad.sas

I use a slightly adapted version of the first for syncing my UNIX userbase with SAS metadata.

(/sashome is wherever you installed your SAS system)

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

This type of question pops up on a regular basis - how can I update SAS metadata using SAS code? My usual response is yes you can but if this is just a one-off change then you can do it far quicker manually and not have the danger of corrupting your metadata repository as well.

 

If you have a lot of spare time to understand the SAS metadata model, and to build and test some pretty complicated SAS code, plus be OK with corrupting your metadata repository while getting your code right, then here is a good place to start your journey:

https://documentation.sas.com/?docsetId=lrmeta&docsetTarget=lrmetawhatsnew94.htm&docsetVersion=9.4&l...

 

And this library article too: https://communities.sas.com/t5/SAS-Communities-Library/Examples-DATA-Step-Functions-for-Reading-Meta...

 

 

PaulHomes
Rhodochrosite | Level 12

In addition to the advice from @SASKiwi, if this is an ongoing requirement, you could also look at using the User Import Macros. Whilst those macros are usually used for syncing with AD/LDAP they can also be used to sync from any other source where you can get the information into SAS tables. It is possible you may find them easier to use and maintain that using the lower level SAS Open Metadata Interface feature.

Kurt_Bremser
Super User

Look at how user/group metadata is synced in the programs

/sashome/SASFoundation/9.4/samples/base/importpw.sas
/sashome/SASFoundation/9.4/samples/base/importad.sas

I use a slightly adapted version of the first for syncing my UNIX userbase with SAS metadata.

(/sashome is wherever you installed your SAS system)

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1143 views
  • 8 likes
  • 4 in conversation