[comp.os.vms] Accessing Callable TPU from FORTRAN??

CC_FERRI@SWTEXAS.BITNET (M. Ferris at SWTSU, 512-245-2595) (06/17/87)

We have a bulletin board program written in FORTRAN in
which certain commands will take the qualifier /EDIT.
When the /EDIT qualifier is used, the command tries to
translates the logical name MAIL$EDIT to build a command
line to pass to a subprocess created by LIB$SPAWN. Here
is the actual code excerpt:

        IF (CLI$PRESENT('EDIT')) THEN           ! If /EDIT specified, then
           LEN = 0
           IER = LIB$SYS_TRNLOG('MAIL$EDIT',LEN,MAILEDIT)
           IF (IER.NE.SS$_NORMAL) MAILEDIT = 'SYS$SYSTEM:MAILEDIT'
           IF (LEN_P.EQ.0) THEN                 ! If no file param specified
              CALL LIB$SPAWN('$@'//MAILEDIT//' "" SYS$LOGIN:BULL.SCR')
              OPEN (UNIT=3,FILE='SYS$LOGIN:BULL.SCR',STATUS='OLD',
     &           DISPOSE='DELETE',ERR=920,FORM='FORMATTED')
              LEN_P = 1
           ELSE
              CLOSE (UNIT=3)
              CALL LIB$SPAWN('$@'//MAILEDIT//' '//BULL_PARAMETER(1:LEN_P)
     &                  //' SYS$LOGIN:BULL.SCR')
              OPEN (UNIT=3,FILE='SYS$LOGIN:BULL.SCR',STATUS='OLD',
     &           DISPOSE='DELETE',ERR=920,FORM='FORMATTED')
           END IF
        END IF

My problem is that some individuals at our site have MAIL$EDIT defined
as "Callable_TPU" and since no CALLABLE_TPU.COM file exists the command
fails. I would prefer not to create a .COM file to handle this but would
rather have the sharable TPU image activated as it is done in MAIL. Has
anyone out there done this specifically from FORTRAN? Thanks in advance
for anyone who can provide me with info.

Mike Ferris
Southwest Texas State Univ.
Phone: (512)245-2595
BITNET: cc_ferris@swtexas
TEXNET: mentor::cc_ferris