;
                                    OE.COM                                    

             Size (recs) CRC   Version    Author/Latest Issue      Disk
OE17.3OM       3k (22)   8B21  1.7        Gene Pizzetta 5/91       Z3COM14
OE17.COM       3k (22)   FE58  1.7        Gene Pizzetta 5/91       Z3COM14

  1- Syntax/Options  2- Usage  3- Configuration  4- Notes  5- Examples/Use    

   O/E (Odd/Even) prints  the  odd- or  even-numbered  pages  of  NewWord  and 
WordStar files for two-sided documents.   It accepts a list of  files and sets
the program error flag on error.   It runs under ZCPR3  only and is condifured
for Epson FX and LQ printer drivers.  Although not tested, OE should also work
with MX and RX drivers.  

   OE uses the formfeeds  (^L) in the source file to toggle  between  printing
and skipping pages.   Since many of the printer escape  codes also contain ^L,
OE keeps track of whether it's reading a printer escape code or not, so it can
ignore ^L's in those strings.  For that reason it is highly printer specific.
:1

    Syntax   OE {dir:}fn.ft {{dir:}fn.ft {...}} /<option>

   At least one input filename is required.   If a  DIR or DU specification is
not given, the current drive  and/or user is assumed.   Multiple filenames may
be separated by spaces, commas, or both.   

   Options   An option is always required.

     O    print odd-numbered pages.

     E    print even-numbered pages.

   "OE //" or even  just "OE"  alone,  will cause  a brief help message  to be 
displayed.

   Once printing is started,  it can be stopped  (cancelled) by  pressing  ^C.
Since the keyboard is checked everytime a character is sent to the printer, it
stops very quickly.
:2
 Usage - 1/5 

CREATING A FILE TO PRINT:   The file that OE prints must be in its  final form 
and must contain all the needed printer escape codes.   There are two possible
ways to save the document in a disk file with all the printer codes.

With WordStar 4 it's very  easy.   You can redirect printer output  to  a disk 
file from within the program.   When WordStar requests  the name of  a printer 
driver to use, enter the name of the driver, followed by a ">" and the name of
the disk file you want the printer output directed to.  For example,
     LQ800>TEST.PRN
will use the Epson LQ-800 printer driver and direct its output to  a disk file 
named TEST.PRN.   No output will go  to the  printer,  but the  disk file will 
contain everything that would ordinarily be sent to  the printer.   If you are 
going to  use  your  default  printer driver,  you can  simply  enter  the re-
direction command at the print driver prompt:
     >TEST.PRN
 Usage - 2/5 

   The second method of saving printer output to  a disk file (the only method 
for NewWord or earlier versions of WordStar) requires the use of a redirection 
utility, such as CP/M Plus's PUT.COM.  To use PUT.COM, before calling WordStar
or NewWord to print the document, enter the following command:
     PUT PRINTER {OUTPUT TO} FILE {d:}<fn.ft> [NO FILTER]
After invoking PUT as above, call WordStar or NewWord and send the file to the
printer in a normal way.   It will be redirected to the disk file given in the 
PUT command line.

   Under ZCPR3 you can  use the  input/output  package  (IOP) RECORDER,  which 
operates in much the same manner as PUT.COM.
 Usage - 3/5 

FORMFEEDS:   In order for OE to work, pages in the document must be delineated 
by formfeeds, so you must answer "Y" to the formfeeds question before printing
begins.   You can  also make  using formfeeds  the  default  with  NWINSTAL or 
WSCHANGE.

MULTIPLE FILE and BATCH OPERATIONS:   About half the time there are  more odd-
numbered pages than even-numbered ones.   With earlier versions of OE you  had  
to print the odd-numbered pages first to ensure you would not run out of paper
before finishing the second side.   For the same reason you couldn't print the 
even-numbered pages from a SUBMIT file.   Beginning with version 1.4, OE sends 
the same number of pages for each run,  merely adding  an  extra  formfeed  if 
there are fewer even-numbered pages.  

   That means you can print either side of the paper  first and you  can use a
command line file list, a multiple command line, a SUBMIT file, or a ZEX file,
to print several documents at once.   You can even print  both  sides from the
same SUBMIT or ZEX file by putting in a "WAIT" command  (such as SAK or PAUSE)
at the end of the printing of one side,  so you can turn the paper over.
 Usage - 4/5 

   Using a file list is  especially  convenient if you  have a  history shell, 
such as  LSH or EASE,  running.   Enter the  command line for printing the odd 
pages:
     OE file1,file2,file3,file4,file5,file6 /o
when the printing is done and you have turned the paper over, recall the line, 
move to the rightmost column,  replace the "O" option  with an "E",  and print 
again.

BOLDFACE ESCAPE CODES:   There is  a  small problem with these printer drivers 
when  a page ends in  boldface and the next page  begins with  boldface.   The 
driver does not re-send the  boldface escade code at the beginning of the next 
page.   If you use both  headers and footers in boldface,  like I commonly do, 
the header on page 2  will not  be in bold.   This also  applies  to  boldface 
paragraphs that continue to the next page without the use of a header.   There 
is a simple solution, however:  enter ^P^O (a binding space) followed  by ^P^H
(a backspace) into the  header before ^P^B (boldface).   If you do  that,  the 
driver thinks it had to print  a non-bold  character and  the  boldface escape 
code will be sent again.  Here is an example header:
 Usage - 5/5 

     .he                                        ^O^H^BThis is a Header^B
This doesn't affect the header any other way,  since it  merely prints a space 
and then backs up a space.  If you don't ordinarily use headers, you could use
a null header that consisted of  nothing  but  a  binding  space and backspace 
surrounded  by ^PB's,  thus  solving the  problem  of boldface  paragraphs (or 
double-struck or italic ones) that continue from a previous page.

ERRORS: 

   On error, OE sets the program error flag as follows:
      4   Aborted by user
     10   Ambiguous filename or file not found
     19   Invalid or missing option
:3
 Configuration 

   There is an additional problem when using drivers which ordinarily print in
near-letter-quality mode.   The NLQ escape string is sent to the  printer only
at the beginning of the document,  unless there is  some  reason  to  send  it
again.  The even-numbered pages would not be printed in NLQ mode unless OE re-
sent the NLQ code before sending the even pages.   To deal with  this problem,
OE can be configured to send the  letter-quality escape string before printing
each file.   The configuration byte can be set or changed using  ZCNFG and the
accompanying OEnn.cfg file.
:4
 OE Notes - 1/2 

   a. Vs 1.7 updates (5/10/91, Gene Pizzetta):
      - Failed to account for LQ ESC-p codes, which caused occasional problems
        and end of print file.  Fixed.

   b. Vs 1.6 updates (not released, 4/28/91, Gene Pizzetta):
      - Modified to work with WordStar LQ printer drivers.
      - Converted to Zilog mnemonics.
      - Added ZCNFG configuration file.

   c. Vs 1.5 updates (7/22/90, Gene Pizzetta):
      - OE now accepts a list of files.  
      - Whether the printer is put into near-letter-quality mode is controlled 
        by  a configuration byte after the label "NLQ>" in the first sector of 
        the COM file (non-zero to send NLQ string to printer).  
      - Now sets program error flag to 10 if  a  file  is  not  found or if an 
        ambiguous file spec is given,  to 19 if no option or an invalid option 
        is given, and to 4 if OE is aborted by the user.  
      - Added type-3 header.  
      - Replaced much of the code with library routines.  
      - Now initializes and de-initializes the terminal.
 OE Notes - 2/2 
 
   d. Vs 1.4 updates (8/18/89, Gene Pizzetta): 
      -- added DU support, TCAP support, and "//" to call up help screen.  CCP
         is now preserved.   Code was modified  to use SYSLIB routines,  OE is 
         now ZCPR3 specific.
 
   e. Vs 1.3 updates (10/14/88, Gene Pizzetta) 
      -- modified to remove CP/M Plus dependencies.

   f. Vs 1.2 updates (1/11/88, Gene Pizzetta):
      -- added SUBMIT compatibility by  having OE ensure that  the same number
         of pages are sent, whether printing odd- or even-numbered pages.

   g. Vs 1.1 updates (10/12/87, Gene Pizzetta): 
      -- added additional trapping code for the  WordStar Epson  FX-85 printer 
         driver.   Added optional sending of Near-Letter-Quality code sequence
         at beginning of each run.

   h. Vs 1.0 updates (6/21/87, Gene Pizzetta):
      -- first release for NewWord Epson FX-80 printer driver.
:5
 Examples of Use 

   a. "A0>oe b:sample.prn /o" 

      - sends the file SAMPLE.PRN on drive B user 0 to the printer,  
        printing only odd-numbered pages.

   b. "A0>oe c15:program.prn d3:doc.prn /e"

      - prints the even-numbered pages of the files PROGRAM.PRN and DOC.PRN.  
