Hi
I have recently created some SAS libraries which are not pre-assigned and then updated the autoexec to preassign them using the meta libname engine. When creating a job in DI studio, SAS then automatically adds a libname statement to the generated code, using the BASE engine. This is fine when the job is running in production, but when we are doing development we are needing to redirect where the library points to. Previously when we used preassigned libraries, we used to be able to update the autoexec to point to a different location when needed. We sometimes have two developers accessing tables in the one library so they need to access two different copies of the library instead. The problem now is that DI studio automatically assigns the libname in the job so we cannot redirect it to a different location. Does anyone know a way around this? or to stop DI studio from doing these libname statements as they're in the autoexec anyway so are unnecessary.
thanks
Tammy
Hi,
about your problem related to several users pointing to the same library: you don't need extra library definitions or locations, ir you license and install SAS/SHARE.
About the general question, you could include a variable on the library definition. In that case, the variable can be initialized on your autoexec and take the value you really need on each SAS session (one user, another user, development, production, even another server, etc).
Why aren't you marking them as pre-assigned when they are?
The way we handle having separate Production and Development environments is by having two SAS Application servers running, one with pre-assigned libraries in metadata pointing at Prod locations, and the other pointing at Dev locations. The LIBREFs are all the same.
If you had this setup then you just point DI Studio to Prod SASApp to run in Prod or to Dev SASApp to run in Dev. No change in autoexecs or code is required.
We have multiple developers working in our one App server Dev environment also. We use change control software to manage the software changes (highly recommended) and as long as they are not working on changes to the same tables at the same time we find it works pretty well.
We also use macro a lot but not for data source definitions, more for locations of code, input and output folders. Again Prod mirrors Dev, so we just have a macro variable which defines which one you are working in. Conveniently we have file shares Prod$ for Prod, Dev$ for Dev so the environment macro variable is either set to Prod$ or Dev$. We define the directories something like this (Windows example):
%let Server = ServerName;
%let Env = Prod;
%let AppDir = \\&Server.\&Env.$\MyAppdir;
Hi,
are prod and dev two different machines, each running their own Metadata Server and App servers,
or, is it one Metadata Server, separating prod and dev by SAS Folders?.
Thanks
Anja
We're just in the process of getting a proper dev environment set up but it will just be separate folders on the existing servers.
So you will have 2 metadata servers?
If so, do both developers have metadata identities in both environments? I am asking these questions because
I am wondering if seting up a SAS Folder and assigning groups with certain permissions might help the
situation.
The problem is not really the pre-assignment but the fact that 2 people need to access the same table at the same time.
Is that a fair statement?
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
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.