home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / rx_slip.zip / chk_once.cmd < prev    next >
OS/2 REXX Batch file  |  1994-10-03  |  1KB  |  47 lines

  1. /*--------------------------------------------------------------*/
  2. /* NOTE: Adjust the following as required by your configuration */
  3.  
  4. PortName      = 'COM2'
  5.  
  6. /*--------------------------------------------------------------*/
  7.  
  8. PortHandle    = ''
  9. True          = 1
  10. False         = 0
  11. Regular       = 2
  12. Critical      = 3
  13. NormalLvl     = 0
  14. InpStr        = ''
  15. Remaining     = 0
  16. crlf          = D2C(13)''D2C(10)
  17. none_on       = '00'
  18. dtr_on        = '01'
  19. rts_on        = '02'
  20. both_on       = '03'
  21. none_off      = 'FF'
  22. dtr_off       = 'FE'
  23. rts_off       = 'FD'
  24. both_off      = 'FC'
  25.  
  26. call RxFuncAdd 'RxAsyncLoadFuncs', 'RXASYNC', 'RxAsyncLoadFuncs'
  27. call RxAsyncLoadFuncs
  28.  
  29. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysloadFuncs'        
  30. call SysLoadFuncs                                                
  31.  
  32. /* open device */
  33.  
  34.  rc = RxAsyncOpen( PortName, 'PortHandle' )
  35.  if rc <> 0   then exit
  36.  
  37.  rc = RxAsyncCarrier( PortHandle )
  38.  if rc = 0 then say 'RxAsyncCarrier detected DCD'
  39.     else do  /* carrier lost */
  40.    '@go kill slip' /* kill slip.exe if found  */
  41.    '@start slip.exe' /* restart slip.exe */
  42.  end
  43.  
  44. /* drop functions */
  45. call RxAsyncDropFuncs
  46. exit
  47.