home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / REXXPRNT.ZIP / REXXPRNT.CMD
OS/2 REXX Batch file  |  1990-10-02  |  2KB  |  55 lines

  1. /* REXX print program for HP Laserjet printers 10-1-90 */
  2.  
  3. arg fileid
  4. call charout prn, D2C(27)||D2C(69)
  5. call charout prn, D2C(27)||D2C(40)||D2C(115)||D2C(48)||D2C(84) /* set to LINEPRINTER font            */
  6. call charout prn, D2C(27)||D2C(40)||D2C(49)||D2C(48)||D2C(85)  /* set to 10U                         */
  7. call charout prn, D2C(27)||D2C(40)||D2C(115)||'16.6'||D2C(72)  /* set to compressed 17 char per inch */
  8. call charout prn, D2C(27)||D2C(40)||D2C(115)||'8.5'||D2C(86)   /* set to 8.5 point text              */
  9. call charout prn, D2C(27)||D2C(40)||D2C(115)||'48'||D2C(80)    /* set to fixed spacing               */
  10. call charout prn, D2C(27)||D2C(38)||D2C(108)||D2C(56)||D2C(68) /* set to 8 lpi                       */
  11. call lineout prn, ''
  12. call lineout , ''
  13. pageno = 0
  14. lineno = 74
  15. borderline = copies('─',130)
  16. do while lines(fileid) > 0
  17.      if lineno = 74 then do
  18.           if pageno \= 0 then do
  19.               call lineout prn, ' '
  20.               bottomline = overlay(' continued ──────',borderline,112)
  21.               call lineout prn, bottomline
  22.               pageline = center('- Page' pageno '-',130)
  23.               call lineout prn, pageline
  24.               call charout prn, D2C(12)
  25.               end
  26.           dateline = strip(right(time('C')  date('W')',' date('M') substr(date('S'),7,2)',' substr(date('S'),1,4),130),'t')
  27.           headerline = overlay(dateline,pageline)
  28.           headerline = overlay(fileid,headerline)
  29.           call lineout prn, headerline
  30.           call lineout prn, borderline
  31.           call lineout prn, ''
  32.           lineno = 1
  33.           pageno = pageno + 1
  34.           call charout , D2C(27)||'[s'
  35.           call charout , 'Printing Page '||pageno
  36.           call charout , D2C(27)||'[u'
  37.           end
  38.      call lineout prn, '     '||linein(fileid)
  39.      lineno = lineno + 1
  40.      end
  41. call lineout prn, ''
  42. bottomline = overlay(' end-of-file ──────',borderline,110)
  43. call lineout prn, bottomline
  44. pageline = center('- Page' pageno '-',130)
  45. call lineout prn, pageline
  46. call charout prn, D2C(27)||D2C(69)
  47. call lineout fileid
  48. call lineout prn
  49. call lineout , ''
  50.  
  51.  
  52. /*         FIDONET:  Matt Johnson @1:376/32.0                    */
  53. /*       or USENET:  uunet!usceast!uscacm!32!Matt.Johnson        */
  54.  
  55.