BookmarkSubscribeRSS Feed
rickybezzo
Fluorite | Level 6

Hi,

 

I would like to create some SAS Folders in the SAS Metadata Repository (e.g. test, dev and prod) where to store SAS programs (not projects) and manage the users access to these folders by mean of SAS Management Console. It seems to me that programs cannot be saved in SAS Folders (while projects and other objects can be saved), even though I found a paper in which the author states that it should be feasible (https://support.sas.com/resources/papers/proceedings14/1365-2014.pdf). We're using SAS Studio and Enterprise Guide as interface. I cannot find the option to save a program in a SAS Folder using both the interfaces.

Does anyone have any experience in this regard? Any suggestion and information would be more than welcome.

Riccardo 

10 REPLIES 10
CarmineVerrell
SAS Employee
You can store your sas programs as a stored process. If you are in EG...here is an example video to help you out.
https://video.sas.com/detail/video/3772834810001/create-a-stored-process-from-an-existing-sas-progra...
rickybezzo
Fluorite | Level 6
Hi Carmine,
thank you for your suggestion. Anyhow, I would like to avoid creating stored processes to store sas programs. Furthermore, some users will use SAS Studio rather than SAS EG, and I'm not sure that stored processes can be managed with SAS Studio.
Riccardo
Quentin
Super User

Are you in a Viya environment or SAS 9 environment?

 

I don't know about Viya, but I don't think this would make sense in a SAS v9 environment.  As I understand it, the metadata repository is used for storing metadata objects.  Code is not a metadata object, it's a text files (.sas).  It's possible to put code into a metadata object (a stored process, or DI job, or whatever).  But as a developer, this makes it harder to work with the code.  When I'm editing a program, I want to use a program editor (or text editor), I don't want to use a stored process editor to write code.  Code buried inside metadata objects is harder to work with.

 

I'm not an admin, but my sense in most environments the admins maintain both metadata repository and OS file system.  We keep our code on the OS.  And you can have Dev/Test OS folders, or Dev/Test servers, or whatever makes sense.

 

By keeping the code accessible on the OS, you enable your developers to use multiple tools to develop their code, and you have all of the OS tools for managing security.


I don't know if Viya makes it more workable for developers to store code in metadata.  But I'd hate to do it if it meant I could only use Studio/EG to work with code.

 

 

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
rickybezzo
Fluorite | Level 6
Thank you Bart,

I'll have a look at it.

Riccardo
Sajid01
Meteorite | Level 14

Hello @rickybezzo 
I agree with @Quentin that metadata repository is for metadata objects.
One should store SAS code in the SAS Folders on the operating System. Folders on the operating system may be provided the required level of security and access needed. Needles to say they can be accessed easily from SAS EG / Studio.

And lastly SAS viya has no metadata server and does not support stored processes.

rickybezzo
Fluorite | Level 6

Hi Quentin,

I agree with you, seems to me that SAS code cannot be saved in SAS Folders. Unfortunately, I cannot manage OS file system because it is under IT responsibility, and my idea was to find a way to manage access to SAS programs by myself.

Riccardo 

SASKiwi
PROC Star

You'd be best to consider storing your SAS programs in a version control tool like Git for ultimate security and control. Both SAS Studio and EG have interfaces to Git.

 

A SAS metadata repository is not designed to handle full-featured code version control.

rickybezzo
Fluorite | Level 6
Indeed, this is the other option we're investigating.
Thank you!
Kurt_Bremser
Super User

The metadata server stores metadata objects, which may contain links to "stuff" stored via webdav.

E.g. a stored process has its code stored as a .sas file in a location on the filesystem of the SAS server, and the STP definition in the metadata has a link pointing to that, from where the STP server loads the code when requested.

Same when you store a EG project to a metadata folder. The .egp file is stored via webdav, not in the metadata itself.

 

My recommendation is to store your programs as .sas files in the server's filesystem and manage access control there.

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
  • 10 replies
  • 1770 views
  • 4 likes
  • 7 in conversation