I may be misunderstanding, but is this
solved by having a -profile.do- on each
computer containing the appropriate
-global- definitions?
Nick
[email protected]
Kieran McCaul
> I work on two computers: one a desktop and the other a
> laptop. The desktop
> was setup with the hard-disk partition into C: and D: drives
> and my data and
> programs are stored on the D: drive.
>
> My laptop, however, has only a C: drive. Therfore, if I
> write programs on
> one they will not run on the other unless I change the C: to
> D: or visa
> versa.
>
> So I now put a global macro at the top of my programs to
> store the alternate
> directory names something like this:
>
> *DESKTOP
> global thesisdata "D:\My Documents\Thesis\Analysis 2003\Setup"
> global thesis "D:\My Documents\Thesis\Analysis 2003\Incidence
> - Histology
> analysis"
> *LAPTOP
> *global thesisdata "D:\Thesis\Analysis 2003\Setup"
> *global thesis "D:\Thesis\Analysis 2003\Incidence - Histology
> analysis"
>
> Now to run a program on my laptop I would remove the * from
> the two LAPTOP
> lines and add them to the two DESKTOP lines.
>
> I occurred to me that perhaps Stata could tell which computer
> it was running
> on. If that were the case, I could re-write my code above so
> that Stata
> automatically assigned the correct macro.
>
> I have found the c-class functions that store operating
> system information,
> but there is nothing in these that is different between my
> two machines.
>
> Are there any undocumented c-class functions that could help,
> or does anyone
> else have a different idea that might work.
*
* 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/