home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!gatech!news.ans.net!cmcl2!rlgsc.com!gezelter
- From: gezelter@rlgsc.com
- Newsgroups: comp.os.vms
- Subject: Re: Detecting directory of invoked .com
- Message-ID: <1992Dec24.005149.297@rlgsc.com>
- Date: 24 Dec 92 00:51:49 EST
- References: <1992Dec23.160636.27010@tigger.jvnc.net>
- Organization: Robert Gezelter Software Consultant, Flushing, NY
- Lines: 59
-
- In article <1992Dec23.160636.27010@tigger.jvnc.net>, fogelinc@nmr1.Cyanamid.COM (Carl Fogelin) writes:
- > At the risk of being flamed by the "active" participants of this Sig, I have
- > a problem which I hope has a reasonable answer.
- >
- > In a DCL program, I would like to be able to determine what directory the
- > invoked .com file is located in. I seem to remember a similar thread about
- > 6 - 8 months ago, so I hope someone remembers the solution.
- >
- Use the lexical function F$ENVIRONMENT with the item code of
- "PROCEDURE". Example:
-
- F$ENVIRONMENT("PROCEDURE")
-
- > Reason: I have a production command procedure that every once in awhile
- > must be moved to a test area for modification. Currently, when I copy the
- > com file to the test area, I comment out the assigns associated with the
- > production version and uncomment the assigns associated with the test
- > version. Unfortunately, sometimes when this command procedure is moved
- > back into production, the assigns are NOT switched back.
- >
- There are some better ways to do this. For example, you could
- define a series of logical names which exist in both the test and
- production environments (they just happen to point to different
- places). This has the added side effect of being completely
- consistent for program testing.
-
- > What I would like is to some code to this command procedure which would:
- >
- > if command file in production area then
- > assign production logicals
- > else
- > assign test logicals
- > endif
- >
- See my comments above.
-
- > Does anyone know a method for doing this?
- >
- > - Carl
- > ---------------------------------------------------------------------------
- > Carl Fogelin (fogelincc@cyanamid.com) "All opinions are strictly mine"
- > "Sushi! That's what my ex-wife called me. Cold fish." -- Blade Runner
- --
- Carl,
-
- Please see my comments above.
-
- I hope that the above information is helpful. If I have been
- unclear, or if I can be of further assistance, please feel free
- to contact me via Email or phone.
-
- - Bob
- +--------------------------------------------------------------------------+
- | Robert "Bob" Gezelter E-Mail: gezelter@rlgsc.com |
- | Robert Gezelter Software Consultant Voice: +1 718 463 1079 |
- | 35-20 167th Street, Suite 215 Fax: (on Request) |
- | Flushing, New York 11358-1731 |
- | United States of America |
- +--------------------------------------------------------------------------+
-