home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / zow311.exe / INSTALL.FIL / SCRIPT / BINSEND.ZRX next >
Text File  |  1998-09-30  |  452b  |  23 lines

  1. /*REXX*/
  2.  
  3. /* this script sends all characters from a file 
  4. (including control characters and the NUL character
  5. to the current device */
  6.  
  7. filename = "foobar.dat"
  8.  
  9. do forever
  10.     c= charin(filename)
  11.     if stream(filename, "s")\="READY" then leave
  12.     
  13.     /* Control Characters 00 - 1F */
  14.     if c2d(c)<32 then c= "^"||d2c(c2d(c)+64)
  15.     else
  16.     /* Quote ^ character */
  17.     if c="^" then c= "^^"
  18.  
  19.     call ZocWrite c
  20. end
  21.  
  22. call stream filename, "c", "close"
  23.