                PRTSEL31: Printer selections for the LAN
Author: Daniel D. Stuhlman
Original date: Feb. 4, 1994
Last revised:  March 17, 1994
file: prtsel31.doc

0. Important notice

This program is to be used for learning or demostration purposes only.  It is
not guarenteed to work for your network configuration.  It has been throughly
tested in my location, but it still may not work for you.  There is no help
available from the author.  This document plus the comments in the source
code should be enough for you to revise the system if it does not work.  The
program depends on two data bases created and maintained independently of
this program.

Copyright 1994 all rights reserved.

I. Introduction

The program PRTSEL31 is a utility designed to be a user-friendly front end
for the Netware Capture command.  PRTSEL31 presents the printer queue names
and allows the user to select a queue and change the default options. Each
option has built-in help screens.

This program is a descendent of the printer select program written by Daniel
Stuhlman in 1990 (version 1.0) and version 2 written by Terry Ward in 1993.
Version 3.1 was completely rewritten in C++ and compiled using in Borland C++.

II. Dependencies on other files

Prtsel31 depends on two data bases maintained by LAN administration.  PRINTER.
DBF contains all the user names and the queues they are able to use.  QUEUES.
DBF contains all the messages for the queues.  The program checks for these
files. If they are missing the program will not work. These data bases should
reside in the same directory as the program.  The batch file to run this pro-
gram should change directories to the one that contains the program and the
data bases.

Sample data bases are included with this program.  Do not change the field
length or number of fields or PRTSEL31 will not read the files correctly.

CAPTURE.EXE is a Netware utility, which must be in the search path.

AN environment variable named, USER, must exist that contains the users'
names as in the dta base. Usually this is set when the person logs into the
LAN.

III. Program operation

Printer.dbf is read to get the queues that the LAN user has the rights to use.
These queues are matched to Queues.dbf to get the printer messages. This infor-
mation is stored in two arrays, display_line and queue_mess. The background
screen is drawn, then the two arrays are displayed. If the number of queues is
greater than 8, the user may scroll from screen to screen. The screen number
is displayed.

Below are sample screens:

Screen with printer queues.  Ready for section of printer or to change defaults.
During this screen the seconds should tick.

ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)  2/4/1994   11:09:49am 
User: DONNIEͼ
 Printer  Location  Message ͻ
 (A) Local Printer             Do not use this choice on a shared printer.   
 (B) ACC-FUND            3702  laserjet 4si    Jetdirect card                
 (C) MIS_2451-LJ4        2451  laserjet4      * phone first !                
 (D) MIS_2632-LJ3        2632  laserjet 3                                    
                                                                             
                                                                             
                                                                             
                                                                             
ͼ
 <Escape> to quit without making any changes.
 F1 Help   F2 Change default settings  1. Data file. 2. Show status  3. Exit.

 Enter your choice:

 Default settings:
 Enable |x|    Banner|_|   Formfeed   |x|  Number of copies |01|
 Timeout |010| No ban|x|   No Formfeed|_|  Form # | 0|      Notify|N|


Message displayed during option to change Timeout.

ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)   2/4/1994   12:02:06 pm
User: DONNIEͼ
 Printer  Location  Message ͻ
 ͻ
  Include this option if you want to print from an application without     
  exiting.  The Timeout option sends data to the printer a specified number
  of seconds after the application last writes to the file. Increase the   
  Timeout if only part of the file is printed.  If using a Postscript      
  printer, disable Timeout. That means TI=0 or make Enable a blank.        
  For example: 015 means wait 15 seconds before sending data to printer.   
 ͼ
                                                                             
ͼ
 <Escape> to quit without making any changes.
 Fͻ
    Change the default settings.  Use the <Tab> key to move from field to   
 E  to field.  <CR> to accept changes and end.                              
  ͼ
 Default settings:
 Enable |x|    Banner|_|   Formfeed   | |  Number of copies |01|
 Timeout |010| No ban|x|   No Formfeed|x|  Form # | 0|      Notify|N|

Screen messages for Banner

ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)   2/4/1994   12:02:06 pm
User: DONNIEͼ
 Printer  Location  Message ͻ
 ͻ
  If Banner is enabled the printer will print a banner page at the         
  beginning of your print job. Your logon name will be on the banner page. 
  Enter an X to enable or <space> to disable.                              
                                                                           
                                                                           
 ͼ
                                                                             
ͼ
 <Escape> to quit without making any changes.
 Fͻ
    Change the default settings.  Use the <Tab> key to move from field to   
 E  to field.  <CR> to accept changes and end.                              
  ͼ
 Default settings:
 Enable |x|    Banner|_|   Formfeed   | |  Number of copies |01|
 Timeout |010| No ban|x|   No Formfeed|x|  Form # | 0|      Notify|N|


Screen messages for form feed.

ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)   2/4/1994   12:02:06 pm
User: DONNIEͼ
 Printer  Location  Message ͻ
 ͻ
  Include this option to enable a form feed after your job has been        
  printed. FormFeed enabled means that the printer starts printing the next
  job at the top of the next sheet of paper.  If an application sends a    
  form feed at the end of a print job, adding this option causes a blank   
  page to be fed through printer.                                          
                                                                           
 ͼ
                                                                             
ͼ
 <Escape> to quit without making any changes.
 Fͻ
    Change the default settings.  Use the <Tab> key to move from field to   
 E  to field.  <CR> to accept changes and end.                              
  ͼ
 Default settings:
 Enable |x|    Banner|_|   Formfeed   |x|  Number of copies |01|
 Timeout |010| No ban|x|   No Formfeed|_|  Form # | 0|      Notify|N|


Message for copies.

ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)   2/4/1994   12:02:06 pm
User: DONNIEͼ
 Printer  Location  Message ͻ
 ͻ
  Use this option to indicate how many copies you want to print.           
  Default is 1. Enter two digits for number of copies. System allows       
  up to 99 copies.                                                         
                                                                           
                                                                           
 ͼ
                                                                             
ͼ
 <Escape> to quit without making any changes.
 Fͻ
    Change the default settings.  Use the <Tab> key to move from field to   
 E  to field.  <CR> to accept changes and end.                              
  ͼ
 Default settings:
 Enable |x|    Banner| |   Formfeed   | |  Number of copies |01|
 Timeout |010| No ban|x|   No Formfeed|x|  Form # | 0|      Notify|N|


Form number message.

ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)   2/4/1994   12:02:06 pm
User: DONNIEͼ
 Printer  Location  Message ͻ
 ͻ
  Use this option to indicate which form number to use.  At this time      
  we have not defined forms other than 0.                                  
                                                                           
                                                                           
 ͼ
                                                                             
ͼ
 <Escape> to quit without making any changes.
 Fͻ
    Change the default settings.  Use the <Tab> key to move from field to   
 E  to field.  <CR> to accept changes and end.                              
  ͼ
 Default settings:
 Enable |x|    Banner|_|   Formfeed   | |  Number of copies |01|
 Timeout |010| No ban|x|   No Formfeed|x|  Form # | 0|      Notify|N|


Messages for notify.

ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)   2/4/1994   12:02:06 pm
User: DONNIEͼ
 Printer  Location  Message ͻ
 ͻ
  Use this option if you want the file server to send you a message        
  when your print job is completed.                                        
  Enter a Y to enable or N for no.                                         
                                                                           
                                                                           
 ͼ
                                                                             
ͼ
 <Escape> to quit without making any changes.
 Fͻ
    Change the default settings.  Use the <Tab> key to move from field to   
 E  to field.  <CR> to accept changes and end.                              
  ͼ
 Default settings:
 Enable |x|    Banner|_|   Formfeed   | |  Number of copies |01|
 Timeout |010| No ban|x|   No Formfeed|x|  Form # | 0|      Notify|N|


Help for Form Feed

ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)   2/8/1994   3:07:30pm  
User: DONNIEͼ
 Printer  Location  Message ͻ
 ͻ
  Include this option to enable a form feed after your job has been        
  printed. FormFeed enabled means that the printer starts printing the next
  job at the top of the next sheet of paper.  If an application sends a    
  form feed at the end of a print job, adding this option causes a blank   
  page to be fed through printer. WordPerfect and 1-2-3 are among the      
  programs that send a form feed when done printing.                       
 ͼ
                                                                             
ͼ
 <Escape> to quit without making any changes.
 Fͻ
    Change the default settings.  Use the <Tab> key to move from field to   
 E  to field.  <CR> to accept changes and end.                              
  ͼ
 Default settings:
 Enable |x|    Banner| |   Formfeed   | |  Number of copies |01|
 Timeout |010| No ban|x|   No Formfeed|x|  Form # | 0|      Notify|N|


General Help message.


ͻ
     Local Area Network Spooled Printers (PRTSEL3.1)   2/7/1994   12:27:01 pm
Help Screenͻ
 PRTSEL3 ver. 3.1 helps you control where you want to send your print job.   
                                                                             
 All the printers that you are able to use are displayed.  Choose the letter 
 on the left side to choose a printer with the options at the bottom of the  
 screen.                                                                     
                                                                             
 If you want to capture to a file hit 1.  This means all output will         
 be saved to a file. Drive F: is assumed. To use this file end capturing     
 by choosing 'A' for local printer. This is the same as the Netware Endcap   
 command.                                                                    
 To view the capture status, hit 2.                                          
 To end this program without changes hit 3, <Escape> or <Enter>              
 F2 enables changing the defaults on the bottom of the screen.               
 Help is displayed when changing the default options.                        
                                                                             
                                                                             
 Call the Help Desk or enter 'Help Capture' at any DOS prompt to learn       
 more about the options.                                                     
                                                                             
Hit any key to continue ͼ


dBase requires exclusive access to the data base files.  When updates are
performed on the data base file they should be done on a clone of the files
and then copied to the production directory.

IV. Defaults
      No banner, no form feed, timeout= 10, copies = 1, no notify

V. Problems and solutions

1.    The work station location in the queue name does not match the location
      or description in the message section.

      This means that the data bases are not matching the printer queue names
      correctly.  Possible causes: queue name is misspelled or queue name is
      missing in queues.dbf.

      Solution:  Check the data bases for errors.  PRTSEL3.1 does not use the
      message section.  The queue name on the left side of the screen is the
      one sent to the printer.

2.    Message on screen: "Required file xxxxx.dbf doesn't exist."

      This means that the required data bases were not found.

      Solution: Make sure user is connected to the network.  Make sure user has
      rights to directory containing data bases.  If many users  get the mes-
      sage, make sure the data bases are in the correct directory.

3.    Error message indicating inability to write a file during an attempt to
      save print output to a file.

      This means the user does not have rights to the current directory.

      Solution: Use a full path without the drive letter.  For example:
       \users\<logon name>

4.    Speaker makes a beep.

      This means an incorrect character was input.

      Solution: Use only the characters allowed by the particular input request.

5.    Only three printer choices appear.

      Those are the only printer queue choices allowed.  If these choices do
      not match what you expect or different ones are needed, contact LAN
      administration to make changes.

6.    The user name is blank or incorrect.

      PRTSEL31 checks the environment variable USER.  If the users is not
      connected to the LAN or the environment variable was changed the name
      will not be correct.

      Solution: Connect to the network, fix the environment variable, or notify
      LAN Administration.

7.    Screen message: The name, CAPTURE.EXE, is not recognized as an internal
      command ...

      A vital file is missing.

      Solution: Find out why CAPTURE.EXE is not in your search path.

8.    After requesting a print the screen and one job ran into someone else's
      job.

      PRTSEL31 sets the default for FormFeed to none. Most applications gen-
      erate a form feed so that the next job starts on the top of a new sheet
      of paper.  Screen prints do not generate form feeds.

      Solution: Change the option to FormFeed on or use the option to send
      print information to a file.  Edit the file to include a form feed at
      the end.  The character for a form feed is a control-L.