home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1998 February / PCOnline_02_1998.iso / filesbbs / os2 / pgprex12.arj / PGPREXX.ZIP / SPLTMAIL.CMD < prev   
Encoding:
Text File  |  1996-08-08  |  896 b   |  36 lines

  1. /* REXX
  2.    Program SPLTMAIL Version 1.2
  3.    Sends header lines via QUEUE to another REXX program, 
  4.    outputs rest of file to standard output for a filter to consume it.
  5. */
  6. /* CopyRight Lueko Willms <lueko.willms@T-Online.de>
  7.                           <L.WILLMS@LINK-F.rhein-main.de>
  8. */
  9.  
  10. parse arg OutMail DEBUG
  11. OutMail = strip(translate(OutMail))
  12.  
  13. DEBUG = (strip(translate(DEBUG)) = 'DEBUG')
  14. TRUE = 1
  15. PARSE SOURCE BetrSyst Shell IchHeisse
  16.  
  17. Erg = STREAM(Outmail,'C','OPEN READ')
  18. IF DEBUG Then
  19.   Say IchHeisse 'Ergebnis von OPEN READ von ' Outmail ':' Erg
  20.  
  21. Zeile = ''
  22. DO UNTIL Length(Zeile) = 0
  23.     Zeile = linein(OutMail)
  24.     Queue Zeile
  25. END /* Do Header */
  26.  
  27. DO While LINES(OutMail) > 0
  28.     Erg = LINEOUT(,LINEIN(OutMail))
  29. END /* the rest of it */
  30.  
  31. Erg = STREAM(Outmail,'C','CLOSE')
  32. IF DEBUG Then
  33.   Say IchHeisse 'Ergebnis von CLOSE von ' Outmail ':' Erg
  34.  
  35. EXIT
  36.