home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19829 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  2.9 KB

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