HPlogo Native Mode Spooler Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 Configuring and Operating Network Printers

Creating and Using Setup Files

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Any user, regardless of their assigned capability, may create files containing customized setup strings (analogous to environment files) to specify the printer operating mode for network printers. Such files can be used in one of two ways: If you have system manager (SM) capability and therefore can edit NPCONFIG, you can name such a file as the setup_file for a particular printer LDEV so that it becomes the default. For example, the following entry in NPCONFIG specifies the setup file LJ4SISET.HPENV.SYS for LDEV 19:

   19     (network_address = 192.187.63.25

           setup_file = LJ4SISET.HPENV.SYS)

If you do not have SM capability, you can create a setup file and direct the spooler to use it while printing a specific spool file by entering the ENV parameter in the FILE command or the (HP)FOPEN intrinsic. When you do so, the spooler assumes that the setup file defines the entire printing environment; that is, your setup file supercedes any other setup file specified in the NPCONFIG.PUB.SYS. For example:

   :FILE MYOUT;DEV=NETPRINT;ENV=PCLELITD

   :FCOPY FROM=MYFILE;TO=*MYOUT

The MPE spooler expects the contents of setup files to be the raw data stream needed by the printer, either in bytestream or record-oriented format. Comments are not allowed. A bytestream file is sent "as is" to the printer. For record-oriented files, the spooler deletes any carriage control (CCTL) character, then trims leading and trailing blanks and concatenates records to arrive at the sequence sent to the printer.

If your printer supports PJL, the resulting data stream can include both PCL and PJL sequences, but they should be ordered so as to make sense to the printer.

CAUTION: Users are entirely responsible for the contents of setup files and their resulting effect on operation. The spooler does not interpret or alter them in any way (except to remove CCTL and blanks as described in this section). In particular, you should be familiar with PCL and PJL concepts as well as the features of your target printer before attempting to create a setup file.

The MPE/iX default environment

For backward compatibility, the MPE system default environment is landscape mode, courier font, 132 characters per line, 6 lines per inch, 60 printed lines per page with a three line top and bottom margin, and single-sided operation. This is often not appropriate for output printed on a cut sheet device such as the LaserJet 4Si. The following approach has been chosen to provide maximum flexibility, while not requiring individual attention for all non-default printing needs.

Setup strings

A "setup", or "setup string", is that sequence of (raw) PCL and/or PJL commands used to place the target printer in a specific operating mode. For example, the PCL sequence Esc&l0O selects portrait mode, while Esc&l1S selects duplex (long edge binding) operation.

You can include any valid PCL/PJL sequence, of any length, in your setup. It is sent just before the user data portion of the spool file and will be used to print the body of the report. Banner pages are printed using the default backward-compatible MPE/iX environment described earlier.

You enter setup strings into a text file with your editor of choice. If the resulting file is a bytestream file, it is incorporated without modification. If the file is a record-oriented file (fixed, variable, or undefined-length records), the spooler first removes any leading carriage control (CCTL) code in each record, then removes any leading or trailing blanks in the record, then concatenates whatever is left to form the final setup string.

Setup file hierarchy

There are four hierarchical levels of setup available to network printer users:

  1. An ENV file specification issued via the ENV=<filename> keyword in a FILE equation or in an (HP)FOPEN intrinsic. If you use the ENV statement, it is applied at the time the file is opened and it supersedes all other setup file specifications described below.

  2. A global setup file specification in NPCONFIG.PUB.SYS, which applies to all network printers and is applied at print time.

  3. An LDEV-specific setup file in NPCONFIG.PUB.SYS, which is applied at print time. Its contents are appended to any global setup file specification, adding to or overriding the global print setup information.

  4. The default MPE/iX environment, which you cannot modify.

If the spooler uses one or both of the setup files specified in NPCONFIG, the setup file(s) are attached when the file is printed, not when it is opened for printing. This means that if you preview the spool file using the SPIFF utility or other browser, you do not see default setup information. Also, any changes to either setup are reflected the next time the spool file is printed. The attributes are not bound to the spool file when it is created. When you direct output to a class such as LP, that designation is resolved to a specific LDEV (that is a member of that class) by the time the file is printed. It is that LDEV's setup file that the spooler uses.

Attaching setup files at print time also allows you to direct old archived spool files or spool files originally targeted for a non-network printer to a network printer. Such files simply inherit the current printing environment of the network printer.

If you specify a global or LDEV-specific setup file that does not exist, cannot be opened for read access, or returns an error while being accessed, the spooler posts a warning message to the console or Associated user and defers the spool file. If neither the global entry nor the LDEV-specific entry of NPCONFIG designates a setup file, the MPE system default environment is used.

Feedback to webmaster