Path: utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!rutgers!gatech!purdue!decwrl!ucbvax!VAX1.CC.LEHIGH.EDU!LUSGR From: LUSGR@VAX1.CC.LEHIGH.EDU (STEVE ROSEMAN) Newsgroups: comp.os.vms Subject: RE: Location Of a Running Program... Message-ID: <8807271228.AA05585@ucbvax.berkeley.edu> Date: 21 Jul 88 15:33:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 31 > From: CS117030%YUSOL.BITNET@IBM1.CC.LEHIGH.EDU > Subject: Location Of a Running Program... > I would like to know if there is any way that you could find > the location of a running program on the disk, because i would > like to put this code in a high level language program, and when > I run the program, it should give me the location where the > actual program is been stored, regardless of my default location. Here is the beginning of a subroutine I use for that purpose. Steve Roseman Lehigh University. ------- SUBROUTINE PS_INIT C C.. INITIALIZATION OF OUTPUT FILE (PROLOG) C CHARACTER UN*12, NODE*20, CDATE*10, CTIME*10, IMAGE*39 include '($jpidef)' C REWIND 99 1 FORMAT(A) WRITE(99,1) '%!PS-Adobe-1.0' WRITE(99,1) '%%DocumentFonts: Courier ' WRITE(99,1) '%%Title: LUCC VAX/VMS Plot V1.0' j = lib$getjpi(jpi$_imagname,,,,image,i1) WRITE(99,1) '%%Creator: '//image(:i1)