Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Sharing ado files on a network


From   [email protected] (Alan Riley)
To   [email protected]
Subject   st: Re: Sharing ado files on a network
Date   Fri, 23 Jan 2004 11:39:58 -0600

Richard Williams ([email protected]) asked about setting
up Stata on a network such that his students would have access to
course materials and to various user-written programs:
> My students are using Stata this semester, and I want them to be able to 
> use various user-written programs.  Apparently, however, they could install 
> stuff on cluster machines, but it would be gone the next day.  The network 
> administrator is willing to install some stuff permanently, but I don't 
> want to be harassing him every week as I figure out what I want!


The students have access to the C: drive of the computers they
are using, but apparently anything they might install on it would
be wiped clean each day.  The students also have access to a network
H: drive where it appears they can save files in a more permanent fashion:

> Students do, however, have networked drives they have regular read/write 
> access to (on our system, the H: drive).


Richard is considering using -sysdir- to change one of the directories
where Stata looks for ado-files but is unsure whether that is the
best solution:

> I was therefore thinking I could have them type in something like
> 
> sysdir set PLUS h:\ado
> 
> That would install programs to h:\ado, right?  But then they wouldn't have 
> access to whatever is on the local c:\ado?


I recommend that Richard take advantage of two features of Stata:

   - profile.do
   - the sysdir 'SITE' directory

Stata will look for a file named 'profile.do' every time it starts
and execute any commands in it.  Richard can create a profile.do containing
the setup commands he wishes all students to run.  The system administrator
at Richard's site can then place this file in the directory where Stata
is installed.  Stata will find it when it starts and execute it.  You can
read more about profile.do by typing -help profile- in Stata.

Assuming that the lab Richard's students are using has a network license
for Stata, one of the places Stata will look for ado-files is known
as the 'SITE' directory.  The 'SITE' directory is intended for files
that are not part of official Stata but are to be made available for
all users at a given site.

You can see the directories Stata will search for ado-files by typing

   . adopath

On a Window computer with a network license for Stata, SITE will
be something like

   C:\Stata8\ado\site

SITE can be reset with the -sysdir- command.  For example, if
Richard had control over the directory H:\mycourse\coursefiles
then he might want to use the command

   . sysdir set SITE "H:\mycourse\coursefiles"

Stata would then know to look in H:\mycourse\coursefiles for ado-files
in addition to the other directories it normally searches.

If Richard puts such a -sysdir- command in the profile.do file that
he asks the system administrator to install on each machine, then
every time any student starts Stata in the lab, they will have their
SITE directory set appropriately.

Richard may also want to redefine the 'PLUS' directory.  If anything
placed by students into C:\ado will be wiped out every night, then
'PLUS' could be set to some directory where the students are allowed
to save files more permanently.  I am not sure what to recommend on
this point since I do not know fully how the network at Richard's site
is set up.  Each student may have their own separate directory on the
H: network drive, and if so, it would be ideal for 'PLUS' to point
at a given student's personal directory.  If Richard wants to correspond
with me about this privately, I would be happy to offer suggestions.


--Alan
([email protected])
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index