home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / CLPNVLP2.ZIP / PRINTCTL.DOC next >
Encoding:
Text File  |  1987-02-26  |  4.1 KB  |  102 lines

  1.  
  2.                         AN AUTUMN'86 CLIPPER PROGRAM
  3.                                     FOR
  4.                        NOVELL ADVANCED NETWARE 286 2.0
  5.                        SPOOL, QUEUE, & PRINTER CONTROL
  6.  
  7.  
  8.        (It is a trivial matter to adapt this program for Dbase III,
  9.        Clipper Winter '85, Advanced Netware 86, or Netware 86 4.61b)
  10.  
  11.  
  12.        Released into the public domain 02/26/87 by Henry J. Franzoni III.
  13.  
  14.  
  15.             Clipper is a trademark of Nantucket, Inc.
  16.             Dbase III is a trademark of Ashton-Tate, Inc.
  17.             Advanced Netware 286, Advanced Netware 86, and Netware 86 are
  18.             trademarks of Novell, Inc.
  19.  
  20.  
  21.             This program requires enough memory to run programs
  22.        from within Clipper (or from within Dbase III).  I use the
  23.        Autumn '86 environmental variable CLIPPER to set the size of
  24.        the program run space.  I used a setting of R=128 for this.
  25.        The program uses environmental variables for some other things
  26.        as well.  In the Network system login script, which is much like
  27.        a batch file, I have two lines like this:
  28.  
  29.                           SET STA="%STATION"
  30.  
  31.                           SET USER="%LOGIN_NAME"
  32.  
  33.             These function much like the batch file commands they are
  34.        similar to. The variable STA becomes set to the logical station
  35.        number of the just-logged-in terminal.  The variable USER
  36.        becomes set to the login name of the person logging in. Make sure
  37.        there is enough room in your environmental space for this.
  38.  
  39.             The following two lines appear in the beginning of
  40.        PROC PRINTSET in order to load the Clipper variables of the same
  41.        names.
  42.  
  43.                       STOR GETE("STA") TO STA
  44.  
  45.                       STOR GETE("USER") TO USER
  46.  
  47.             The function GETE() is in the Extenddb.prg file enclosed
  48.        with the Autumn '86 compiler, and was placed in the public
  49.        domain by Tom Rettig Associates.
  50.  
  51.             There are other ways to determine the station number
  52.        of the requesting terminal using one of the services available
  53.        through INT21H, but I won't discuss that here.
  54.  
  55.             The procedure printset as is is written to be called like
  56.        this:
  57.                              DO PRINTSET
  58.  
  59.             With a slight change to the first two lines, the procedure
  60.        can be called with two parameters, the row and column, like this:
  61.  
  62.                         DO PRINTSET WITH 20,0
  63.  
  64.             I leave it to you to do this if you wish, bear in mind that
  65.        passing parameters below row 20 and left of column 0 will require
  66.        some program modification.
  67.  
  68.             The program is designed for a network with two printers,
  69.        since that is what I have.  An IBM Proprinter is printer 0,
  70.        and an Epson LX-80 is printer 1.  Once again, it should be easy to
  71.        modify this for any number of network printers.  The control codes
  72.        for the printers are in the procedure CTLCODES.
  73.  
  74.           (IBM is a trademark of International Business Machines)
  75.             (Epson LX-80 is a trademark of Epson America,Inc.)
  76.  
  77.             Make sure that the Novell utilities Q.EXE, SPOOL.EXE,
  78.        and ENDSPOOL.EXE are available in search directories in the
  79.        current mapping. (Very similar to DOS PATH commands). Usually
  80.        these are in the SYS:PUBLIC directory.
  81.  
  82.                Procedures in the file PRINTCTL.PRG:
  83.  
  84.              1) PRINTSET - Main program
  85.              2) QUEUE - Queue control subroutine
  86.              3) SPOOL - Spooler control subroutine
  87.              4) CTLODES - Special printer control codes subroutine
  88.              5) ASKL - Asks a logical (Y/N) question
  89.              6) ASK2 - Asks a multiple choice question
  90.              7) BLOCKCLR - Clears a four line x 80 character block
  91.  
  92.  
  93.              Please feel free to improve on this program.  I would
  94.              appreciate any feedback via this BBS or send info to:
  95.  
  96.                       65 Nassau St. Apt. 10c
  97.                       New York, N.Y. 10038
  98.  
  99.  
  100.                               Thanks,
  101.  
  102.                                       HENRY J. FRANZONI III