HP OpenVMS Systems

Ask the Wizard

HP OpenVMS Systems

OpenVMS information

» What's new on our site
» Upcoming events
» Configuration and buying assistance
» Send us your comments

HP OpenVMS systems

» OpenVMS software
» Supported Servers
» OpenVMS virtualization
» OpenVMS solutions and partners
» OpenVMS success stories
» OpenVMS service and support
» OpenVMS resources and information
» OpenVMS documentation
» Education and training

Quick Links

» Non-javascript page
» Ask the Wizard

Test Drive OpenVMS

» OpenVMS I64 test drive
» Java test drive

Other information resources available to you include:

» OpenVMS freeware
» ECO kits, software and hardware support, prior version support
» Alpha SRM, ARC, and AlphaBIOS firmware updates
» ENCOMPASS - HP user group
» OpenVMS software downloads, OpenVMS freeware CD-ROM
» OpenVMS firmware locations
» DECconnect passive adaptor charts
» Cables reference guide
» MicroVAX console commands
» OpenVMS student research

Select a topic below to see Questions Frequently Asked by partners

» Using the online documentation library(installing BNU from the asap SDK)
» Global sections(how to create and use.)
» xx$CREATE_BUFOBJ system service(usage)
» Ethernet address(methods of determination)
» Shareable images(cookbook approach to creating one)
» Sharing data/code at absolute addresses(a guide with examples)
» Determining the Alpha microprocessor
» Using GETSYI to get hardware status

Evolving business value

» Business Systems Evolution
» AlphaServer systems transition planning
» Alpha RetainTrust program

Related links

» HP Integrity servers
» HP Alpha systems
» HP storage
» HP software
» HP products and services
» HP solutions
» HP support
disaster proof
HP Integrity server animation
HP Integrity server animation
Content starts here

Ask the Wizard Questions

DCL: Access a modem

The Question is:

Is there a DCL way to talk to a modem hanging off a
serial port on a VAXstation? I need to write some code
that will sequentially dial a series of numbers, wait
for answer, check for correct response from, hang up
and then go to the next modem.  I know I can manually
do this with the SET HOST/DTE TTA2.


The Answer is:

    	The following should get you started.

    $ open/read/write modem	_tta0:
    $ write modem "ATDT ''number'"
    $ read modem response
    $ close modem

    	You need to add the logic to check the response move on to the next
    number etc.  You should be able to dial, hang up, and read messages
    from the modem with no problems.  Doing real data communications this
    will leave you a little short.

      I like to use a timeout on the READ and a read loop to handle
    multi line responses. Here's part of a command procedure I use to
    dial out. Of course, you could quieten it down a bit by removing the
    SHOW SYMBOL commands, but I like to see what's going on.

    $ SET NOON
    $ modem="TTA2:"
    $ cr[0,8]=13
    $ Retry: ON WARNING THEN GOTO Retry
    $ ALLOCATE 'modem'
    $ SET NOON
    $ SHOW TERM 'modem'
    $ INQUIRE ans "turn modem on and hit return"
    $ WRITE SYS$OUTPUT "Setting up modem""
    $ OPEN/READ/WRITE modem 'modem'
    $ CALL TellModem "atq0v1e1"
    	... other setups...
    $ CLOSE modem
    $ SET HOST/DTE 'modem'
    $ EXIT
    $ TellModem: SUBROUTINE
    $ WRITE SYS$OUTPUT "Sending modem ''p1'"
    $ READ/TIME=1/ERR=noresp/PROMPT="''p1'''cr'" modem response
    $ SHOW SYMBOL response
    $ retry: READ/TIME=1/ERR=endresponse/PROMPT="" modem response
    $   SHOW SYMBOL response
    $   GOTO retry
    $ noresp:
    $ stat=$STATUS
    $ WRITE SYS$OUTPUT "No response, status=''stat'"
    $ endresponse: EXIT