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

  1. /*************************************************************/
  2. /* CMPERFORM ( operation , identifier )                      */
  3. /*                                                           */
  4. /*   CMPERFORM sends a request to CMANAGER and then waits    */
  5. /*   for CMANAGER to accept the request.  CMPERFORM will     */
  6. /*   block until CMANAGER sends an acknowledgement on the    */
  7. /*   response queue.                                         */
  8. /*                                                           */
  9. /*   This acknowledgement does not imply successful          */
  10. /*   completion of the request--only that CMANAGER has       */
  11. /*   accepted it.                                            */
  12. /*                                                           */
  13. /*   "operation" is any valid CMANAGER operation (see        */
  14. /*   CMANAGER() for details).                                */
  15. /*                                                           */
  16. /*   "identifier" is the identification that will be         */
  17. /*   displayed in the CMANAGER() log for this request.       */
  18. /*************************************************************/
  19.  
  20. trace OFF
  21.  
  22.   signal on HALT name CLEANUP
  23.   signal on FAILURE name CLEANUP
  24.   signal on SYNTAX name CLEANUP
  25.  
  26.   command = CMCommandQueue
  27.   response = rxqueue(create)
  28.  
  29.   parse arg operation, caller
  30.  
  31.   previous = rxqueue(set, command)
  32.  
  33.   queue (operation '15'x caller '15'x response)
  34.  
  35.   call rxqueue set, response
  36.  
  37.   answer = linein('QUEUE:')
  38.  
  39. CLEANUP:
  40.  
  41.   call rxqueue set, previous
  42.   call rxqueue delete, response
  43.  
  44. exit (answer == 1)
  45.  
  46.