home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / comm / ems-1.0.lha / EMS / Rexx / TestRouting.ems < prev    next >
Text File  |  1993-03-29  |  792b  |  50 lines

  1. /* TestRouting.ems */
  2.  
  3. options results
  4. signal on error
  5. signal on syntax
  6.  
  7. parse arg from to flavor .
  8.  
  9. if( ~show( 'l', "ems_rexx.library" ) ) then
  10. do
  11.    if( ~addlib( "ems_rexx.library", 0, -30, 0 ) )then
  12.    do
  13.       say "Could not open ems_rexx.library"
  14.       exit 10
  15.    end
  16. end
  17.  
  18. if from = '' then
  19. do
  20.  
  21.    say 'Usage: Rx TestRouting.ems <origin address> <destination address> <message flavor>'
  22.  
  23. end
  24. else
  25. do
  26.  
  27.    say 'Routing a message as' flavor 'from' from 'to' to
  28.    say
  29.  
  30.    call EMS_Tosser_TestRouting( from, 'to', 'flavor' )
  31.  
  32.    say 'Result: Send through' to 'as' flavor
  33.  
  34. end
  35.  
  36. call EMS_FreeScriptData()
  37. exit 0
  38.  
  39. error:
  40. syntax:
  41.  
  42. error_text = EMS_LastError()
  43.  
  44. if error_text = '' then error_text = rc ErrorText( rc )
  45.  
  46. say '| ***BREAK: error at' sigl error_text
  47.  
  48. call EMS_FreeScriptData()
  49. exit rc
  50.