BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I know that this problem has been address previously on the forums, but I'm having a difficult time finding a solution that fits my particular situation.

We have mulitple servers here, each server containing a data set, which has fields identical to each of the other data sets on each of the other servers. For example, there is the Zone 1 Server, with the data set named Zone1, then there is the Zone 2 Server, with the data set named Zone2. Both have identical column names, the only difference is the name of the server and data set.

I have written a project that I would like users in each Zone to be able to use. I have access to all of them, where as most users have access to only their own Zone. I was hoping to be able to make a copy of the project file, open the new copy, rename it, then just point it to the other Zones, then save, effectively copying the project for each of the 13 Zones.

The project starts with a query, producing a new data set, then multiple queries are run off of this, which are then appended into one table, on which a parameter query is run, giving your final results. I assumed if I changed the original data set (by right mouse click, Change...) it would simply replace the beginning data set with the new one (Zone1 to Zone2 for example), and then because all of the fields have identical names, it would simply run through the project. This isn't the case.

When I replace the Zone1 with Zone2, my first query runs fine, but the resulting data set does not overwrite the previously created one (even though I tell it to), from which the rest of my project runs. So, the rest of the branch is running based on the old query results from Zone1, when what I really need is for the rest of the branch to run off of a query of Zone 2. I hope this makes sense. My first query is named BaseQuery, and the results are named BaseTable, so I was hoping that would override any issues with the source of the next set of queries, but it doesn't seem to help. I just get 2 BaseTables, that are identical in fields, with different data.

I would prefer not to have to write this project 13 times...well, let me rephrase that. I am making 13 versions, one for each zone to run, but I'd rather not have to rewrite each one completely from scratch. Does anyone see a way around? I'm starting to get to the point where the time I've taken to find a solution could have been spent writing all 13 from scratch. 🙂 I just can't accept that there's not a workable solution. Thank you very much for your help! Almost forgot...I'm using SAS EG 4.


Message was edited by: abaker
1 REPLY 1
Patrick
Opal | Level 21
It's almost impossible to answer your question only based on your narrative.

Are you using SAS EG 4.1 (which is for SAS 9.1) or SAS EG 4.2 (=SAS9.2) ? I ask this question because there is quite an improvement regarding prompting with the newest release. But anyway...

If I understand that right then the project (the underlying code) would always be the same and the only difference is where you read the data from.

If that's so: Couldn't you add a prompt in the beginning asking the user in which zone he is (or even better retrieve this information from somewhere based on the user under which the SAS process is running) and then read the data from the right server (some SAS macro code which result in a libname statement pointing to the right server and then create a view called "zone" containing the ZONEn dataset on this server).

In all consecutive steps you just use the view "zone" which always points to the correct zone dataset.

Hope this answer correlates somehow with the situation you're in.

Patrick

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 764 views
  • 0 likes
  • 2 in conversation