home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
- From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
- Newsgroups: comp.os.vms
- Subject: Re: Detecting directory of invoked .com
- Date: 25 Dec 1992 06:26:29 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 38
- Distribution: world
- Message-ID: <1he9ilINN1o3@gap.caltech.edu>
- References: <1992Dec23.181631.29078@tigger.jvnc.net>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- In article <1992Dec23.181631.29078@tigger.jvnc.net>, fogelinc@Cyanamid.COM (Carl Fogelin) writes:
- >>In <1992Dec23.160636.27010@tigger.jvnc.net> fogelinc@nmr1.Cyanamid.COM writes:
- >>
- >>> 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.
- >>
- >>Try: f$parse(f$env("procedure"),,,"directory")
- >
- >This was exactly what I needed. I'd like to thank:
- >
- > Richard Critz critz@star.enet.dec.com
- > Malcolm Dunnett dunnett@mala.bc.ca
- > Ulli 'Framstag' Horlacher orakel@rz.uni-ulm.de
- >
- >for their immediate help.
- >
- >Ok Carl and Ehud, feel free to vilify me. I should have seen this in TFM or $HELP.
-
- Well, I'll vilify you for not telling us whether or not you also wanted the
- device name (in most such cases, you would).
-
- >On a related note, is there any way from within an executable to determine the
- >name of the DCL command program which invoked said executable? If it makes a
- >difference, my executable was programmed in C. Again thanks.
-
- The name of the procedure, no (unless you want to do some sort of kernel hack,
- in which case you'd be best off asking Ehud via e-mail). VAX C will easily
- give you the name of the image you're running, but not the procedure that
- invokde the image.
- --------------------------------------------------------------------------------
- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
-
- Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
- understanding of astronomy is purely at the amateur level (or below). So
- unless what I'm saying is directly related to VAX/VMS, don't hold me or my
- organization responsible for it. If it IS related to VAX/VMS, you can try to
- hold me responsible for it, but my organization had nothing to do with it.
-