home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff330.lzh / Vt100 / RexxSamples / Forwarding.rexx < prev    next >
OS/2 REXX Batch file  |  1990-03-02  |  464b  |  33 lines

  1. /* */
  2. trace R
  3.  
  4. portname = "REXX-VT100"
  5. Port = openport(portname)
  6.  
  7. if Port = '00000000'x
  8. then do
  9.     say "Couldn't open the port."
  10.     exit 20
  11. end
  12.  
  13. address VT100-serial.device-00 "FORWARD" portname
  14.  
  15. do i = 1 to 5
  16.     call waitpkt portname
  17.     packet = getpkt(portname)
  18.     message.i = getarg(packet);
  19.     call reply packet, 0
  20. end
  21. trace ?R
  22. packet = getpkt(portname)
  23. if packet ~= '00000000'x
  24. then do
  25.     message.6 = getarg(packet)
  26.     call reply packet, 0
  27. end
  28.  
  29. call closeport port
  30.  
  31. nop
  32. exit
  33.