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

  1. Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
  2. From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Detecting directory of invoked .com
  5. Date: 25 Dec 1992 06:26:29 GMT
  6. Organization: HST Wide Field/Planetary Camera
  7. Lines: 38
  8. Distribution: world
  9. Message-ID: <1he9ilINN1o3@gap.caltech.edu>
  10. References: <1992Dec23.181631.29078@tigger.jvnc.net>
  11. Reply-To: carl@SOL1.GPS.CALTECH.EDU
  12. NNTP-Posting-Host: sol1.gps.caltech.edu
  13.  
  14. In article <1992Dec23.181631.29078@tigger.jvnc.net>, fogelinc@Cyanamid.COM (Carl Fogelin) writes:
  15. >>In <1992Dec23.160636.27010@tigger.jvnc.net> fogelinc@nmr1.Cyanamid.COM writes:
  16. >>
  17. >>> In a DCL program, I would like to be able to determine what directory the
  18. >>> invoked .com file is located in.  I seem to remember a similar thread about
  19. >>> 6 - 8 months ago, so I hope someone remembers the solution.
  20. >>
  21. >>Try:   f$parse(f$env("procedure"),,,"directory")
  22. >
  23. >This was exactly what I needed.  I'd like to thank:
  24. >
  25. >    Richard Critz              critz@star.enet.dec.com
  26. >    Malcolm Dunnett            dunnett@mala.bc.ca
  27. >    Ulli 'Framstag' Horlacher  orakel@rz.uni-ulm.de
  28. >
  29. >for their immediate help.
  30. >
  31. >Ok Carl and Ehud, feel free to vilify me.  I should have seen this in TFM or $HELP.
  32.  
  33. Well, I'll vilify you for not telling us whether or not you also wanted the
  34. device name (in most such cases, you would).
  35.  
  36. >On a related note, is there any way from within an executable to determine the
  37. >name of the DCL command program which invoked said executable?  If it makes a
  38. >difference, my executable was programmed in C.  Again thanks.
  39.  
  40. The name of the procedure, no (unless you want to do some sort of kernel hack,
  41. in which case you'd be best off asking Ehud via e-mail).  VAX C will easily
  42. give you the name of the image you're running, but not the procedure that
  43. invokde the image.
  44. --------------------------------------------------------------------------------
  45. Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
  46.  
  47. Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
  48. understanding of astronomy is purely at the amateur level (or below).  So
  49. unless what I'm saying is directly related to VAX/VMS, don't hold me or my
  50. organization responsible for it.  If it IS related to VAX/VMS, you can try to
  51. hold me responsible for it, but my organization had nothing to do with it.
  52.