home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19830 < prev    next >
Encoding:
Text File  |  1992-12-24  |  1.4 KB  |  41 lines

  1. Newsgroups: comp.os.vms
  2. Path: sparky!uunet!inmos!inmos.co.uk!odonovan
  3. From: odonovan@inmos.co.uk (Brian O'Donovan)
  4. Subject: Re: Detecting directory of invoked .com
  5. Message-ID: <1992Dec24.094544.9241@inmos.co.uk>
  6. Sender: news@inmos.co.uk
  7. Reply-To: odonovan@inmos.co.uk (Brian O'Donovan)
  8. Organization: INMOS Limited, Bristol, UK.
  9. References: <1992Dec23.160636.27010@tigger.jvnc.net>
  10. Date: Thu, 24 Dec 1992 09:45:44 GMT
  11. Lines: 28
  12.  
  13. In article <1992Dec23.160636.27010@tigger.jvnc.net> fogelinc@Cyanamid.COM writes:
  14. >
  15. >In a DCL program, I would like to be able to determine what directory the
  16. >invoked .com file is located in.  I seem to remember a similar thread about
  17. >6 - 8 months ago, so I hope someone remembers the solution.
  18. >
  19. [...]
  20. >
  21. >Does anyone know a method for doing this?
  22. >
  23. >- Carl
  24. >---------------------------------------------------------------------------
  25. > Carl Fogelin (fogelincc@cyanamid.com)     "All opinions are strictly mine" 
  26. >   "Sushi!   That's what my ex-wife called me.  Cold fish." -- Blade Runner
  27.  
  28.  
  29. Hi,
  30.  
  31.   Try lexical function F$ENVIRONMENT with the PROCEDURE item.  This will give 
  32. you the full spec of the current procedure.  Use F$PARSE to get just the 
  33. directory part.
  34.  
  35.   For more information look at HELP LEX F$ENVIRONMENT (a most useful function)
  36. and HELP LEX F$PARSE.
  37.  
  38.   Cheers,
  39.  
  40.     'o-Dzin / Brian (isodonovan@isnet.inmos.co.uk) Where's me sig gone now?
  41.