Special Printer Types

This section describes various special printer types and printing methods and covers the following topics:


UNIXLP – Direct TCP/IP Printing

What is Direct Printing?

See TCP/IP Direct Printing in the Concepts and Facilities documentation.

Prerequisites

The following prerequisite is required for using TCP/IP Direct Printing:

  • A print service according to RFC1179 which "speaks" the LPD/LPR protocol. This can be a printer server that processes printer queues (field 'Dest') or a printer or a conversion box that is directly attached to TCP/IP "speaking" LPR/LPD.

Installation of Direct Printing

Note:
for z/VSE installations: You have to position the TCP/IP library in front of the LE/VSE library in the phase search path. Otherwise, error message EDCV001I will be generated. Sample LIBDEF statement to run TCP/IP programs: // LIBDEF PHASE,SEARCH=(PRD1.BASE,PRD2.SCEEBASE)

  1. Assemble the Natural batch driver with LE/370 option set to YES. This enables Entire Output Management to access POSIX functions.

    Note:
    Avoid slashes in your Natural parameters. The slash "/" is the escape character which passes the complete parameter block to LE/370 and Natural will not process any of these parameters.

  2. Make module ESMLPR available to your ESY server. In z/OS, the data set in which it is contained (usually NOM.LOAD) must be APF-authorized and a PDSE data set.

  3. Define a DD data set "SYSOUT" in your ESY startup job. This will be used for tracing and error messages of ESMLPR.

  4. Start the Monitor and printer tasks with profile parameter RCA=(ESMLPR) (entered in the corresponding SATPxxx member in library SYSSATU) to ensure ESMLPR will be loaded dynamically.

  5. Define physical printers of type UNIXLP and logical printers pointing to them.

    When you add a physical printer of type UNIXLP, a logical printer with the name DEFAULTx (x = A to Z) is added automatically. DEFAULT printers contains default values for UNIXLP printer parameters. If the Monitor detects an empty parameter value of a logical printer pointing to a physical UNIXLP printer, the corresponding value from the appropriate DEFAULT printer is taken. When you delete a physical UNIXLP printer, the corresponding logical DEFAULT printer is also deleted. DEFAULT printers can be modified like any other logical printer, but they cannot be renamed, deleted or copied.

    The following fields are available (besides the field Copies of the general print attributes):

    Field Explanation Symbol
    Destination Name of the printer queue of the printer server. &UXLPDEST.
    Escape-before-1, -2, -3 Hexadecimal digits, sent as control bytes to the printer before printing. &BEF-1. &BEF-2. &BEF-3.
    Escape-after-1 Hexadecimal digits, sent as control bytes to the printer after printing. &AFT-1.
    Listname The name of the listing (passed to the server). &LISTNAME.
    Port Server port to be talked to;
    D default: port 515.
    &PORT.
    Server

    The IP address or name of the printer server or the printer (if the printer has its own IP address).

    The IP address has to be in the format nnn.nnn.nnn.nnn (IPv4) or hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh (IPv6).

    If you enter a name, it has to be fully qualified, that is, including the DNS name.

    &SERVER.
    User User ID that can be passed to the destination spooling system. If empty, the Entire Output Management user ID will be used. &USER.
    Formfeed
    • BEFORE - Entire Output Management performs no form feed, and Natural's form feed at the beginning is processed.

    • AFTER - Natural's form feed at the beginning is suppressed, and Entire Output Management generates a form feed after the document.

    • NONE - Natural's form feed at the beginning is suppressed, no form feed is generated after the document.

    • BOTH - Natural's form feed at the beginning is left untouched, and Entire Output Management generates an extra form feed after the document.

    &UXLPFFEED.
    Spoolhost Identifies the Entire Output Management source host, either by name or by IP address. &SPHOST.
    Spoolnumber Unique number for "dest.spool". Random if empty. &SPNO.
    Table Name of table in SYSNOMU for conversion. &TBL.
    Trace 0 or blank = no, 1 = yes. &UXLPTR.
  6. Print your reports on these logical printers. Entire Output Management will convert ASA or machine-code formatted reports into ASCII (where a skip to the next page is represented by form feed and carriage return, a line feed is done using line feed and carriage return, regarding the given ASA- or machine code control characters)

  7. Send it to the desired printer as usual. The printer task will use low-level TCP communication and create entries such like print time and spool attributes.

Usage of Translation Tables

Entire Output Management itself performs EBCDIC-ASCII conversion using the Natural built-in conversion method, i.e the EBCDIC-ASCII table which can be altered using Natural profile parameter TABA1. This ensures that the conversion can be adapted to the country-specific code page desired.

Additionally the name of a translation table can be entered in the special attributes of a printer of type UNIXLP. This translation table is used subsequently, that is, its translation will be performed after the default translation has taken place.

The lines will be translated using Natural's internal EBCDIC-ASCII table, which can be altered with the Natural TABA1 profile parameter. However, if some more characters are to be altered depending on a printer, you can specify the name of a text object in the TABLE field; this will cause the printer task to read this text object from the library SYSNOMU. The text object has the following format:

aaxx
bbyy
...

where aa and bb are the characters that are to be converted (in hexadecimal representation), and xx and yy are the characters which are to replace them.

These values will be converted after the conversion of the default table has been done. This means, aa and bb are already ASCII values that are to be altered.

Example of a text object:

4145
4246
434A

This will translate the whole document into ASCII using the Natural table, then convert the following characters:

A to E
B to F
C to J

Do not use any comments in such an text object.

NATUNIX Printers

A printer of type NATUNIX works only if Entire Output Management runs under Natural for UNIX.

Natural for UNIX provides a print method which is stored in a Natural parameter file. NATUNIX overrides these definitions and gives the opportunity to address files or subsequent UNIX programs that receive the print data.

For example, if NATUNIX calls the print utility LPR, you can reach all destinations LPR can do.

NATUNIX uses the Natural application programming interface (API) USR1069, which changes the printout parameters. For further information, see the API description in the library SYSEXT, if the active report to be printed is a text report.

Binary reports are not printed using the print system of Natural. Instead, a temporary file will be written to directory $EOM_WORK and then printed using the command provided in the parameter Printer Name. If Output-Target 2 is specified, the NATUNIX printer expects a file name according to the rules below. The resulting temporary file is then moved to the target file. Therefore it is strongly recommended that DISKUNIX printers be used for binary reports instead.

See also NATUNIX or DISKUNIX - Comparison of Characteristics.

Attributes

Attribute Explanation Symbol
Formfeed

Determines whether and where a form feed is to be inserted:

  • BEFORE (or blank) - form feed before the document; this is the default.

  • AFTER - form feed after the document.

  • BOTH - form feed before and after the document.

  • NONE - no form feed.

This parameter applies to the printout as a whole. It does not affect form-feed specifications within the printout. A form feed is also inserted before each separator page.

For binary reports, this parameter is ignored.

&NTUXFFEED.
Linesize Number of characters per line.

For binary reports, this parameter is ignored.

&LINE-S.
Max-Pages Maximum number of pages to be printed.

For binary reports, this parameter is ignored.

&MAXPAG.
Output-Target To define a program to get control after printing, enter 1. To print into a file, enter 2. &NTUXTARG.
Pagesize Number of lines per page. &PAGE-S.
Printer Name The name of the program to get control after printing, the name of the printer or file which receives the output.

Examples:

  • lpr -P printserver:printer and Output-Target 1: The printout will be routed to printer on printserver using the lpr command.

  • $EOM_WORK/&UFNAM.-&TMST. and Output-Target 2: If you have loaded a file print.out, a corresponding file will be created in Entire Output Management's work directory beginning with its name and a timestamp after the hyphen.

  • mail -s "NOM-Printout" email@provider and Output-Target 1: The printout will be routed to the specified email address; thus you can send an email, using the pipe mechanism.

If this field is empty and Output-Target 2 is specified, the printout will be routed to the contents of the environment variable $EOM_WORK.

&PHYS.
Print Method Always TTY. &METH.
Profile A printer profile; see the description of the API USR1069 in the Natural library SYSEXT. &PROF.
Trace Enter 0 (or blank) to switch tracing off. Enter 1 to start the tracing of the Monitor output (CMPRINT). &NTUXTR.

DISKUNIX Printers

A printer of type DISKUNIX works if Entire Output Management runs under Natural for UNIX or Natural for mainframes. This printer type is designed to write the print output to a file in a UNIX or Windows file system.

The target system can be local or remote and must run a Entire System Server for UNIX node which is defined in the Entire Output Management UNIX defaults (menu 8.1, menu item 13). If this node is not intended to serve as input node it can be deactivated. DISKUNIX printouts will reach this node regardless of the node status.

After writing the printout file, a command can be executed on the target node that controls further processing. This feature can be used for printing on real printers, routing to other computers, converting the data, etc.

If the attribute symbol &FNAM. is not specified in any attribute field, the command line will be concatenated in the format:

<Command><Opt1><Opt2><Path>/<Filename>.<Filetype><Parm1><Parm2><Parm3>

If &FNAM. is specified in any attribute field, the command line will be concatenated as follows:

<Command><Opt1><Opt2><Parm1><Parm2><Parm3>

The resulting log output of this command will be written to the file <Logpath>/<Filename>.log.

See also NATUNIX or DISKUNIX - Comparison of Characteristics.

Attributes

Attribute Explanation Symbol
Command If this field is not empty, a command or a script will be executed on the target system after the printout file has been written. The command will be executed asynchronously; Entire Output Management will not wait for a return code. &CMD.
Filename

The name of the file to be written to the target system.

If this field is empty, the original file name of the file will be used if available.

&FNAM.
Filetype

The file type of the file to be written to the target system. This does not contain the period character (.) between filename and filetype.

If this field is empty, the original file type of the file will be used if available.

&FTYP.
Opt1 and Opt2 Command options before the file ID. &OPT1. and &OPT2.
Parm1 to Parm3 Parameters after the command and file ID. &PARM1. to &PARM3.
Path

The path on the target system to which the file will be written.

If this field is empty, the path will be determined by the contents of the environment variables $EOM_WORK on UNIX and %EOM_WORK% on Windows.

&PATH.
Logpath The path of the output file which is created by <Command>. If this field is empty, <Path> will be used instead. &LPATH.
Server The node name of the Entire System Server service which is active on the target system. This has to be defined in the UNIX defaults (menu 8.1, item 13). &SERV.
Trace Enter 0 (or blank) to switch tracing off. Enter 1 to start the tracing of the Monitor output (CMPRINT). &DSUXTR.

Formatting Attributes for File-Format Conversion

For general information on format conversion, see Converting the Report Format in the Concepts and Facilities documentation.

Field Explanation Symbol
Output Format The desired output format. Predefined formats are available, which correspond to the following Ghostscript devices: &OFO.
Format
Ghostscript device
BMP bmp16m
EPS epswrite
FAX faxg3
HTML html
JPEG jpeg
PCL pxlcolor
PDF pdfwrite
PNG png16m
PS ps2write
RTF rtf
TIFF tiff32nc

Any other value in this field will be interpreted as the name of a Ghostscript device which may be present in the specific user environment. See the Ghostscript documentation for details.

If this field is empty, no file conversion will be performed.

Enscript and Uniprint Attributes (optional)
Formatter The utility which is to perform the rendering. Possible values:
  • enscript - The Enscript utility will be used (this is the default).

  • uniprint - The Uniprint utility will be used.

  • auto - Entire Output Management will choose the utility to be used: By default, Enscript will be used; however, if multibyte characters are detected in the print data, Uniprint will be used.

 
Header

The name of the Enscript "fancy-header". If this field is empty, no header will be generated. If this field contains DEFAULT, the Enscript default fancy-header will be used.

If Uniprint is used, this field will be ignored.

&HDR.
Header Font

Enscript: The font name of the header and footer, including the font size (in points); for example: Courier10.

Uniprint: The font size of the header (in points).

&HDRFNT.
Footer

The Enscript footer definition.

If Uniprint is used, this field will be ignored.

&FOOT.
Font

Enscript: The font name of the text report, including the font size (in points); for example: Courier10

Uniprint: The file name of a truetype font. The font size (in points) can be specified as a separate number after the file name. The default is: DejaVuSansMono.ttf 8

&FONT.
Lines

Enscript: The number of lines per page for a text report.

If Uniprint is used, this field will be ignored.

&LPP.
Landscape If this field is empty, the pages will be created in portrait orientation. If you want landscape orientation, enter any character in this field. &LAND.
Media The paper size to be printed. &MED.
Mask File

The name of a PDF file which can overlay all pages of a report that is in PDF format. This file is treated as a "stamp" on each page: Only the parts of the mask file which are transparent will show the original report. In this way, logos can be integrated in a report. If the mask file contains more than one page, the corresponding pages of the report will be overlaid.

The use of mask files requires that the package "pdftk" (PDF Toolkit) is installed on the conversion node.

A PDF file with transparent parts cannot be created with a Windows PDF printer; instead, you have to use the "export to PDF" function of a graphic application (for example, Photoshop or Gimp).

&MASK.
Code Page Specify the code page in which the text report is to be stored. If this field is empty, the code page "latin1" (ISO-8859-1) will be used by default. &CODE.
Additional In this field, you can specify any additional parameters. &DSUXADD.
For details on the above Enscript and Uniprint attributes, see the Enscript and Uniprint documentation (man pages).

NATUNIX or DISKUNIX - Comparison of Characteristics

On UNIX systems only the printer types NATUNIX and DISKUNIX are available. Which printer type you use depends on the intended purpose. To help you make this decision, the following table compares the characteristics of both printer types.

With this printer type, you can ... NATUNIX DISKUNIX
... use any printer type definable in the Natural parameter module. Yes No
... pass output to a receiving external process (conversion, e-mail, external printing). Yes, but only with "Output Target = 1", using the pipe mechanism. Yes, with an external command which uses the created file.
... pass output to a remote system. No Yes
... execute a command with the created file on a remote system (UNIX, Windows). No Yes
... avoid the use of any broker communication (to improve performance). Yes Yes, but only if the UNIX node is defined as "L" (local node).
... process binary files. Yes, but not recommended. Yes
... address any printer queue in the CUPS spooling system. Yes, it is processed directly if "lpr" is the receiving program (faster). Yes, "lpr" can handle the created file (slower).
... handle formfeeds before and after text document printing. Yes (except for binary reports). No
... limit the pages to be printed. Yes (except for binary reports). No
... handle Natural printer profiles. Yes No
... build the file name to be created with variables (for example, time-stamp, process ID). Yes, a few. Yes, many.