09-15-2016 08:52 PM
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.
09-16-2016 03:02 AM
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).
09-16-2016 09:35 PM
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.
09-21-2016 07:13 PM
09-26-2016 04:25 AM - edited 09-26-2016 04:43 AM
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;
09-26-2016 09:31 AM
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?.
09-29-2016 12:55 PM
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
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?