labcat Command

Purpose

Prints a process's Sensitivity Label (SL) on the banner, and at the top and bottom of each printed page.

Syntax

labcat files

labcat [-P pagetype] [-U] [-p lines] [-c] [-f] [files]

Description

The labcat command generates secure binary labels, in human-readable format, for the System V print subsystem with Trusted AIX® installed using two modes of operation. This command uses the DIA label-encodings software to produce the labels that appear on the banner and pages.

In general, the labcat command parses each printer command sent to the printer. Those commands, which cannot corrupt internal page labeling or affect the permanent state of the printer, is passed through unaffected. Suspect commands are modified if possible, but the labcat command resets the printer and then exits with an error code if the use of a particular command is unacceptable, thereby aborting the print job. Thus, dangerous commands are not sent to the printer. The next printer reset (preceding the next print job) re-establishes the printer default state.

The labcat command examines the shell environment variable TERM (set by the lpsched command to indicate the printer type) to determine the language of the printer commands that it receives from standard input. A value of hplaserjet or hplaser implies PCL language (standard configuration); PS, PS-b, or PSR indicates PostScript language (postscript configuration).

Flags

Item Description
-c Adds a carriage return to the output.
-f Indicates that standard input rather than a file is used.
-p lines Indicates the number of lines of text per page.
-P pagetype

Determines the correct location for the labels to appear at the top and bottom of various size pages. If you do not specify the pagetype parameter, the page-type letter is assumed. In a postscript configuration, the value for pagetype is sent to the printer after the printer is reset, but before the print-job object is sent.

In standard configuration, the pagetype parameter must be one of the following:
  • executive
  • letter
  • legal
  • a4
  • monarcenvelope
  • coml0envelope
  • dlenvelope
  • c5envelope
The pagetype parameter is converted into horizontal and vertical positions that are used for the placement of the trusted labels.
-U Specifies that pages are not to be labeled.
files Specifies the files to be printed. You can print multiple files. Separate the files with blank spaces.

Exit Status

Item Description
0 The command completed successfully.
-1 The command failed.

Error codes

The labcat command returns a failure under one of the following conditions:
  • It cannot audit the event.
  • The page length or page type is not valid.
  • It cannot open the label-encodings file.
  • It cannot open the file to be printed.