 
      SUBROUTINE SHOWFILE(IFILNAME,DEVNAM,LDEV,DIRNAM,LDIR)
C
C  GET THE CURRENT DEFAULT DISK AND DIRECTORY BY PARSING A DUMMY
C  FILENAME WITH THE RMS SERVICE CALL
C  DMC:  FOLLOWING HINTS BY M. THOMPSON
C
        CHARACTER*(*) IFILNAME  ! INPUT FILENAME
      CHARACTER*(*) DEVNAM  ! OUTPUT DEVICE NAME
      CHARACTER*(*) DIRNAM  ! OUTPUT DIRECTORY NAME
 
      INTEGER LDEV	      ! OUTPUT LENGTH OF DEVICE NAME
      INTEGER LDIR	      ! OUTPUT LENGTH OF DIRECTORY NAME
 
C-----------------------------------------------------------------------
C  VAX CODE
#ifdef __VMS
      CHARACTER*127 XPDNAM
      CHARACTER*127 IFILNAMI
C
C  RMS CONTROL BLOCK DECLARATIONS
C
 
      INCLUDE '($FABDEF)'
      INCLUDE '($NAMDEF)'
 
      RECORD /FABDEF/ DFAB
      RECORD /NAMDEF/ DNAM
 
      LDEVMAX=LEN(DEVNAM)
      LDIRMAX=LEN(DIRNAM)
C
      IFILNAMI=IFILNAME
C
C  SET UP FILE ACCESS BLOCK (FAB) AND RMS NAME BLOCK (NAM)
C
      DFAB.FAB$B_BID = FAB$C_BID
      DFAB.FAB$B_BLN = FAB$C_BLN
      DFAB.FAB$L_FNA = %LOC(IFILNAMI)
      DFAB.FAB$B_FNS = LEN(IFILNAMI)
      DFAB.FAB$W_IFI = 0
      DFAB.FAB$L_NAM = %LOC(DNAM)
 
      DNAM.NAM$B_BID = NAM$C_BID
      DNAM.NAM$B_BLN = NAM$C_BLN
      DNAM.NAM$L_ESA = %LOC(XPDNAM)
      DNAM.NAM$B_ESS = LEN(XPDNAM)
 
      CALL SYS$PARSE(DFAB)
 
      LENDEV = DNAM.NAM$B_DEV
      LENDIR = DNAM.NAM$B_DIR
 
      IDEV=1
      IDIR=LENDEV+1
 
      LDEV=MIN0(LDEVMAX,LENDEV)
      DEVNAM(1:LDEV)=XPDNAM(IDEV:IDEV+LDEV-1)
 
      LDIR=MIN0(LDIRMAX,LENDIR)
      DIRNAM(1:LDIR)=XPDNAM(IDIR:IDIR+LDIR-1)
C
#endif
      RETURN
      END
