home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / slip-cm.zip / CMStart.CMD < prev    next >
OS/2 REXX Batch file  |  1994-04-06  |  1KB  |  36 lines

  1. /*************************************************************/
  2. /* CMSTART ( identification , synchronize_flag )             */
  3. /*                                                           */
  4. /*   CMSTART is used to start a SLIP session for the program */
  5. /*   identified by "identification."  CMSTART will optionally*/
  6. /*   wait until the SLIP driver is started before returning  */
  7. /*   to the calling program (synchronize_flag == 1).         */
  8. /*                                                           */
  9. /*   One CMSTOP() should be issued for each CMSTART() request*/
  10. /*   when the session is completed (see CMWRAPPER() for more */
  11. /*   details).                                               */
  12. /*                                                           */
  13. /*   "Identification" is a free-from string which will appear*/
  14. /*   in the CMANAGER console output for the START operation. */
  15. /*   The same identification string should be specified for  */
  16. /*   the corresponding CMSTOP() operation.                   */
  17. /*************************************************************/
  18.  
  19. trace OFF
  20.  
  21.   signal on HALT name CLEANUP
  22.   signal on FAILURE name CLEANUP
  23.   signal on SYNTAX name CLEANUP
  24.  
  25.   parse arg caller, synchronize
  26.  
  27.   completed = CMPerform('START', caller)
  28.  
  29.   if completed & (synchronize == 1) then do
  30.    '@SLIPWAIT 240 > nul'
  31.     completed = (RC == 0)
  32.   end /* if */
  33.  
  34. CLEANUP: exit (completed == 1)
  35.  
  36.