home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 January / CHIPCD1_98.iso / software / tipsy / zoc / install.fil / SCRIPT / RXSAMPLE / TUTORIAL / 9_LASTLN.ZRX < prev    next >
Text File  |  1996-08-26  |  461b  |  27 lines

  1. /* REXX */
  2.  
  3. /* send something to the modem and wait for an anwser */
  4. CALL ZocSend "AT\S^M"
  5.  
  6. /* wait for answer */
  7. CALL ZocTimeout 10
  8.  
  9. /* read text linewise and wait for a line containing OK */
  10. DO X=1 TO 999 UNTIL ZocLastline()="OK"
  11.     timeout= ZocGetline()
  12.     IF timeout=640 THEN DO 
  13.         LEAVE
  14.     END
  15.  
  16.     /* remember all lines */
  17.     A.X= ZocLastline()
  18. END 
  19.  
  20. /* show all lines again */
  21. DO Y=1 TO X
  22.     SAY Y ":" A.Y
  23. END
  24.  
  25. EXIT
  26.  
  27.