LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 1999, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 2 Feb 1999 12:09:34 -0800
Reply-To:     "Berryhill, Timothy" <TWB2@PGE.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Berryhill, Timothy" <TWB2@PGE.COM>
Subject:      Re: Re-post: SAS, serial I/O and modems
Comments: To: Bigpond <tchur@BIGPOND.COM>
Content-Type: text/plain

Tim, What platform and version? My V6 2nd Ed. Windoze Companion says the COMTIMEOUT=WAIT option prevents the datastep from timing out. It sounds to me like you are not getting the documented behavior. The manual also mentions the alternative COMTIMEOUT=ZERO as returning a length zero record on timeout. In your script, which loops until an acceptable value appears, COMTIMEOUT=ZERO might work.

Does your modem have sound? Does it connect? Can you attach a dumb terminal (or terminal emulator) and dial by hand?

Tim Berryhill - Contract Programmer and General Wizard TWB2@PGE.COM or http://www.aartwolf.com/twb.html Frequently at Pacific Gas & Electric Co., San Francisco The correlation coefficient between their views and my postings is slightly less than 0

> ---------- > From: Bigpond[SMTP:tchur@BIGPOND.COM] > Reply To: Bigpond > Sent: Tuesday, February 02, 1999 11:43 AM > To: SAS-L@UGA.CC.UGA.EDU > Subject: Re-post: SAS, serial I/O and modems > > Sorry if this is a re-post, but I got an error message saying my original > post was rejected (don't know why)... > > > >Does anyone have some SAS which they are willing to share which carries > out > >a conversation with a dial-up host over a modem. I am not talking about > >SAS/CONNECT. I mean data step code which writes to and reads from a > serial > >port to which a modem is attached. I am trying to write a data step which > >implements a simplified version of TAP (Telelocator Alphanumeric > Protocol) > >V1.2 so that a SAS batch job can send messages (up to 160 characters) to > my > >GSM (digital) mobile phone using the GSM Short Message Service. The > >following code (incomplete as yet) works as far as dialing the modem, but > >the data step then times out with a LOST CARD statement while waiting for > >the modem to negotiate with the modem at the other end and return a > CONNECT > >response. Any clues or tips? The number being dialled only works in > >Australia, although I believe that most telecom companies offer a dial-up > >interface to pager and mobile phone SMS using the TAP protocol, so the > code > >may eventually be useful elsewhere. > > > >Tim Churches > > > >options noxwait ; > >x "mode COM1: BAUD=2400 PARITY=E DATA=7 STOP=1" ; > > > >filename modem commport 'COM1:' ; > >filename modin commport 'COM1:' ; > > > >data _null_ ; > > attrib x length=$200 ; > > infile modem unbuffered lrecl=200 pad device=commport comtimeout=wait > >missover ; > > > > file modem ; > > put '+++ATZ' ; > > file log ; > > t = 0 ; > > do until (x =: 'OK') ; > > input x $ ; > > t + 1 ; > > put t= x= ; > > end ; > > > > file modem ; > > put '+++AT&C1' ; > > file log ; > > t = 0 ; > > do until (x =: 'OK') ; > > input x $ ; > > t + 1 ; > > put t= x= ; > > end ; > > > > file modem ; > > put 'ATDT018018767' ; > > file log ; > > t = 0 ; > > do until (x =: 'CONNECT') ; > > input x $ ; > > t + 1 ; > > put t= x= ; > > end ; > > > > file modem ; > > put ; > > file log ; > > t = 0 ; > > do until (x =: 'ID=') ; > > input x $ ; > > t + 1 ; > > put t= x= ; > > end ; > > > > file modem ; > > logon = byte(27) || "PG1mnmail" ; > > put logon ; > > file log ; > > t = 0 ; > > do until (x = byte(6)) ; > > input x $ ; > > t + 1 ; > > put t= x= ; > > end ; > > > > stop ; > > run ; > > > >filename modem ; > > > > > > > > >


Back to: Top of message | Previous page | Main SAS-L page