home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxcomm16.zip / samples / rxcInit.cmd < prev    next >
OS/2 REXX Batch file  |  1999-02-09  |  661b  |  30 lines

  1. /**
  2.  * REXX Communication Control Function Library  Ver.1.1
  3.  *                  copyright 1998, Naga(Kazuo Adachi)
  4.  *                          mailto:nagaw@ibm.net
  5.  *                          mailto:GDB00421@nifty.ne.jp
  6.  *
  7.  * $Id$
  8.  *
  9.  * $Log$
  10.  */
  11.  
  12. ARG initStr
  13.  
  14. CALL RxFuncAdd 'RxCommLoadFuncs','RxComm','RxCommLoadFuncs'
  15. CALL RxCommLoadFuncs
  16.  
  17. /*--------------------------------------------------------*/
  18. /**
  19.  * Sending Modem Command
  20.  */
  21. rc = RxCommWrite( initStr || '0D'x )
  22. DO FOREVER
  23.     rc = RxCommRead()
  24.     CALL CHAROUT , rc
  25.     IF POS( 'OK'   , rc ) = 1 THEN RETURN 0
  26.     IF POS( 'ERROR', rc ) = 1 THEN RETURN 1
  27. END
  28.  
  29. RETURN -1
  30.