home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / vxtech06.zip / VXTECH06 / EMPLIST / DDEEXEC.VRX < prev    next >
Text File  |  1994-04-18  |  546b  |  31 lines

  1. /*:VRX         Main
  2. */
  3. /*
  4.     ok = DDEExec( dde, cmnd [, wait] )
  5.     
  6.     - Wait can be "N" (no wait) or "W" (wait, the default)
  7. */
  8. Main:
  9.     parse arg dde, cmnd, wait
  10.  
  11.     retVal = 0
  12.  
  13.     if wait = "N" then do
  14.         wait = "NoWait"
  15.     end
  16.     else do
  17.         wait = "Wait"
  18.     end
  19.  
  20.     ok = VRMethod( dde, 'Execute', cmnd, wait )
  21.     if ok \= "OK" then do
  22.         call Error 'Unable to execute "' || cmnd || '", (' || wait || '):' ok
  23.         signal DDEExecDone
  24.     end
  25.  
  26.     retVal = 1
  27.  
  28. DDEExecDone:
  29. exit retVal
  30.  
  31.