Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!INDYVAX.BITNET!IJAH400 From: IJAH400@INDYVAX.BITNET Newsgroups: comp.os.vms Subject: Finding the *entire* filespec an image was activated with. Message-ID: <8803061310.AA01627@ucbvax.Berkeley.EDU> Date: 2 Mar 88 02:26:00 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 31 Hello, all. I'm trying to find the entire file specification that an image was activated with. If I was writing in C it would be no problem, I'd just look at argv[0]. Unfortunately, this is for a professor who insists on doing it FORTRAN. Getting the IMAGNAME item from SYS$GETJPI does me no good, it only returns the name, not the device and directory. Neither does LIB$GET_FOREIGN, it returns everything AFTER what I am looking for. Finally, getting the value of $LINE using CLI$GET_VALUE also loses, it just shows me what the user typed, which may not be what I want (i.e., suppose the user has SYS$SYSTEM defined as search list, and the program (sorry, image) was run out of something near the bottom of the list. All I can tell from the spec at the beginning of the line from CLI$GET_VALUE (if the image was invoked using a foreign command, for example) was that the device name was not specified (i.e., was SYS$SYSTEM). This was real simple to do under TOPS-20, you could just look at what file a page (that you knew was still mapped to the EXE file) was mapped from. There must be a simple way to do it under VMS, since the VAXC runtime support evidently knows how... Thanks in advance... -------------------------------------------------------------------------------- James A. Harvey, Analyst/Programmer Phone: (317)274-0747 Indiana University - Purdue University at Indianapolis E. & T. 1023, 799 W. Michigan Street Indianapolis, IN 46220 ijah400@indyvax.bitnet Blessed are They who keep Messy Offices, for only They shall know the Joy of Finding That which was thought to be Irretrievably Lost. - Found on Prof. Nick Kira's office door.