[comp.os.vms] MACRO Program to Drop DTR Briefly

jas@mulga.oz (John Shepherd) (06/23/87)

Thanks for your replies so far. Unfortnuately, I got the original
question a little bit wrong. The correct description is:

On a VAX 11/780 under VMS 4.5 a terminal logged onto the Vax selects
the function to SET HOST/DTE/DIAL(etc) to dial out another port which
has a modem attached. This is used to log onto another Vax. If the user
does a CONTROL-\ to return to the local host, the session between the
two modems remains, even when the user has logged off the local machine.
The next user of the modem gets the session. We would rather have some
mechanism for making the local modem hang up in ther=se situations.

We have tried doing the following in the hope of disabling control
signals and convincing the local modem to hang up:

SET TERM/NOMODEM <modem port>
WAIT 00:00:02
SET TERM/MODEM <modem port>

How do we get the local modem to hang up?

Training users to log off the remote system is not a reliable solution,
and some of these modem connections are (unfortunately) overseas links.

carl@CITHEX.CALTECH.EDU.UUCP (06/28/87)

 > On a VAX 11/780 under VMS 4.5 a terminal logged  onto  the  Vax  selects  the
 > function to SET HOST/DTE/DIAL(etc) to dial out another port which has a modem
 > attached.  This is used to log onto another Vax.  If the user does a CONTROL-
 > to return to the local host, the session between the two modems remains, even
 > when the user has logged off the local machine.  The next user of  the  modem
 > gets  the  session.  We would rather have some mechanism for making the local
 > modem hang up in these situations.

The mechanism exists and works properly on my system, and should work on
any system using a DZV11, DHV11, DZ11, DZ32, DMF32, DMB32, DHU11, DMZ32,
LAT, or VAX 8200 serial lines as the terminal interface.

 > We have tried doing the following in the hope of  disabling  control  signals
 > and convincing the local modem to hang up:

 > SET TERM/NOMODEM <modem port>
 > WAIT 00:00:02
 > SET TERM/MODEM <modem port>

Well, that's a start, since it means that you've normally got the  terminal  set
/MODEM.   However,  I  can't  find  anything in the documentation that says that
setting a terminal /NOMODEM affects the signals the VAX sends to the  modem;  it
simply  says  that  if  the  terminal  is  set /NOMODEM, the VAX will ignore all
incoming modem signals.  On the other hand, there IS  a  setting  documented  to
drop  modem  control  signals  under  certain  circumstances.   Quoting from the
"Terminal Driver" section of the VAX/VMS I/O User's Reference Manual:   Part  I,
section 8.2.3.2:

    By default, logging out on a line with modem signals will not break  the
    connection.   If TT2$M_HANGUP is set, modem signals are dropped when the
    process logs out. If TT2$M_MODHANGUP is set, no privilege is required to
    change the  state  of  TT2$M_HANGUP.   By  setting  TT2$M_HANGUP, system
    managers can prevent nonprivileged users who  are  not  logged  in  from
    tying up a dial-in line.

Actually, when referring to the behavior of  terminals,  the  manual  should  be
talking  about "when all channels have been deassigned" rather than "when a user
logs out", since what they say applies to both cases, and the latter is a subset
of the former.

 > How do we get the local modem to hang up?

You  should  try  setting  the  terminals  connected  to  the  dial-out   modems
/Modem/Hangup/Dialup/Permanent.   This  means that the system will pay attention
to modem control signals at all times, and will drop DTR when it is  deallocated
(if  the user didn't explicitly allocate the terminal, assigning a channel to it
implicitly allocates it).  I'm not sure whether the  /DIALUP  characteristic  is
necessary; at one time, it had an effect on whether /NOHANGUP would do anything.

 > Training users to log off the remote system is not a reliable  solution,  and
 > some of these modem connections are (unfortunately) overseas links.

Note:  Your users could easily get in  the  habit  of  allocating  the  dial-out
terminal  before  issuing  the  "SET HOST/DTE"  command, so as to permit them to
return  to  the  local  machine  without  losing  their  connection  (since  the
terminal's  still allocated, it has a channel assigned, and won't drop DTR).  If
this happens, then you'll probably start seeing them  occasionally  forget  that
they have the terminal allocated, and tie up the line (with or without the phone
call still going on) for hours on end.