CssNT Manual

CSS Unitec Home Page

Commercial Spooling System

Release 4.1

Welcome to the CSS reference manual. It contains the following chapters:

1. Introduction
2. Installation
3. Utility Descriptions
4. Configuration
5. Programming

Copyright © by Unitec Informatik, www.unitec.ch. All rights reserved.

Back to top


Introduction

Chapter 1 - Introduction

1.1. Welcome
1.2. About CSS
1.3. Changes in this Release
1.4. Migration to this Release
1.5. Conventions Used in this Manual
1.6. Syntax of Command Lines
1.7. Support, Feedback
1.1. Welcome

This manual is the reference for the Unitec Commercial Spooling System CSS. It provides complete description of all CSS utilities, functions and configuration tables. The information provided explains in detail, what the system capabilities are, but it does not explain how to make use of them. If you are unfamiliar with the use of spooling systems, you may want to study additional computer literature on this subject.

The manual is organized as follows:

Chapter | Name | Contents
1 | Introduction | Short overview of the functionality of CSS, the organization of this manual and the changes implemented in the current version.
2 | Installation | Description of the installation process of CSS.
3 | Utility Descriptions | Description of all CSS utility programs.
4 | Configuration | Description of the CSS configuration tables.
5 | Programming | Description of the CSS program interface.
1.2. About CSS

The CSS package consists of a collection of programs and utilities providing a sophisticated control of all print activity on UNIX systems. Functionality and operation of CSS are specially designed to cover the needs of commercial applications. The user interface is an easy to operate dialog program allowing the administration of multiple printers, forms and report queues. All CSS programs are written in the C language and thus portable to all UNIX system with minimal effort.

The major benefits of CSS are:

  • Support for multiple virtual print server environments, allowing service centers to set up a distinct print server for each client or user group
  • Device independent programming
  • Database for printer and forms definitions
  • Form definition utility / laser printer macro administration
  • Easy to operate dialog program for complete user control and report preview
  • Embedded lpr options within the report files
  • Administration of multiple report queues
  • Report-Preview (preview of spool files, search capabilities)
  • Print test (paper adjust)
  • Report management with keep-date
  • Device routing
  • Automatic backup printer activation
  • Translation tables for characters and strings
  • Real multi-user capabilities
  • Compression of the spool files
  • Remote print support for lpd, rtel, pros and raw protocols
  • Graphical interface for Windows workstations
1.3. Changes in this Release

This release of CSS incorporates all enhancements already described in the READ.ME file of the previous release and the manual has been extended accordingly. All other changes are shown in the following list:

  • Configuration of multiple virtual CSS print servers has been implemented. See the Configuration section for details.
  • Designed for existing software with hard coded printer control sequences, special devices for the report preview in css(U) and WinCss(U) can be defined. See the VIEW_DEVICE and WINCSS_VIEW_DEVICE parameters in css.default(C) and the vd-capability in css.devices(C) for details.
  • The CssNT product line has been dropped. In environments with one or several Windows NT/2000 application servers, we recommend a Linux system with CSS and Samba installed. This will provide the most economic, flexible, reliable and fastest print server.
  • As with each new release, many "minor" changes, corrections and improvements have been implemented and all known bugs have been eliminated.
1.3.1. Changes in Release 4.0

Changes in release 4.0 are shown in the following list:

  • The WinCss release number has been changed to be in sync with CSS.
  • The TCP/IP server cssws(U) for the WinCss graphical interface has been extended to support new functionality. The degree of enhancements made it necessary to implement a new communication protocol. In order to provide backward compatibility, the current program version also supports the protocol used in the previous release. Support for old protocols will be dropped in the next release.
  • Due to the long version history of CSS, attempts of the setup(I) program to recover statistical report information from the queue control file have been dropped. Queue recovery form the spool directory works as usual.
1.3.2. Changes in Release 3.4

Changes in release 3.4 are shown in the following list:

  • The TCP/IP server cssws(U) for the WinCss graphical interface has been extended to support new functionality.
  • The csu(U) program has new options to show report keep dates.
  • Device routing has been implemented. For details see css(U), the o-option of csu(U) and the wft and wfc capabilities in css.devices(C).
  • The syntax of the bo x and eo x capabilities in css.devices(C) have been extended to include new conditions to restrict output to particular report copies and ordering variable contents. For details see css.devices(C) in section Basic Capabilities.
  • The size of the CSS error log file can now be defined in the css.default(C) configuration table.
  • The navigation default to wrap screens in the css(U) dialog from last to first (pre 3.3x behavior) can now be defined in the css.default(C) configuration table.
1.4. Migration to this Release

The notes in the following sections are intended help you to avoid incompatibilities, they do however not cover new features that may be used without affecting current installations.

Important! Before you upgrade from a previous CSS version, we urge you to save your data! If you do not want to perform a full save, make sure that you are able to rollback to your current version in case of installation problems. For this, you need your current software including the setup program, a save of the CSS base directory (normally /usr/lib/css) as well as a save of your reports in the CSS spool directory (normally /usr/spool/css). Unitec can not be made responsible for any damage caused by installation problems. Please also read the Unitec License Agreement.
1.4.1. Migration from Release 2.7

This section is of importance to users only who are currently using CSS Release 2.7 or earlier.

  • Since the tr-parameters in css.devices(C) in this release may also define a file name, control strings beginning with the symbol '/' (slash) must be redefined to start with '\/', '\057' or '\x2f':

    old: tr=abc=/xy/z
    new: tr=abc=\/xy/z

  • The bor-, eor- and tr-parameters in css.devices(C) may now include control variable. A single '%' symbol must therefore be defined as '\%', '\045' or '\x25':

    old: bor=\E%5x
    new: bor=\E\%5x
    old: tr=abc=mn%p
    new: tr=abc=mn\%p

  • The functionality of the if1-, if2-, tf1- and tf2-parameters in css.devices(C) is now covered by the possibility of multiple bor- and eor-parameters and has thus become redundant. For compatibility reasons they remain supported. They may however be removed in a future release and we recommend to replace them as in:
    old: if1=/usr/css/if1
    new: bor=/usr/css/if1

    The order of the definitions determines the output order.

  • The syntax or control variables has been changed and extended. See also css.devices(C).

  • The method of the 'external locks' (el-parameter) may be specified in css.default(C). The default differs from the method used in previous versions but is safer. The previous method used (sema) should only be used to synchronize the use of a device that has to be shared with another software product, but not for multiple logical device definitions of a physical printer.

1.4.2. Migration from Release 3.3

This section is of importance to users only who are currently using CSS Release 3.3 or earlier.

  • The use of the report condition flags that have been set with the C-option of the lpr(U) spooler front-end has changed. Starting with release 3.4, these flags are reset to the initial C-option values for each copy printed. To control copy specific behavior, the extended syntax of the bo x and eo x device capabilities can be used. To mimic prerelease 3.4 condition flag processing, the JOB_FLAGS parameter in css.default(C) may be set to true.

1.4.3. Migration from Release 3.4 or higher

No compatibility issues need to be considered.
1.5. Conventions Used in this Manual

This section describes how the various symbols and typefaces are used in this manual.

Symbols

If you have worked with C before, you may already be familiar with many of this manual's symbols.

Symbol | Meaning
| | Separates alternative entries.
[] | Encloses optional items.
... | Follows bracketed syntax that may be repeated.
{} | Encloses a group of options that are separated by '|'. one of the options must be selected.
< > | Encloses a key-name. For example, the Control key is represented by <Ctrl>.

Typefaces

Typeface | Meaning
Bold | A reserved word, a function-, command- or argument-name.
Italic | Names of variables to which values must be assigned, such as filenames and command-options.
Underlined | Default options.
Monospaced | Example programs and data.

References

In order to minimize distraction by references to additional information of specific topics, the following conventions apply:

A reference to a section in the same chapter is represented by the section name in bold type.

A reference to a section in a different chapter or in the standard Unix-Manual is represented by the section name in bold type followed by a chapter identification enclosed in parenthesis ().

The reference id's used throughout this manual are:

ID | Reference
(I) | Chapter 2 / Installation
(U) | Chapter 3 / Utility Descriptions
(C) | Chapter 4 / Configuration
(P) | Chapter 5 / Programming, Interface
(1) | UNIX Standard-Commands
(2) | UNIX System-Calls
(3) | UNIX Library Subroutines
(4) | UNIX Special Files
(5) | UNIX File Formats
1.6. Syntax of Command Lines

The general format of CSS command lines is:

command [option...] [file...]

  • command

Name of the command

  • option

We distinguish between options with and options without arguments (switches).

    Options without argument

    Switches have to be entered as -s, this is a hyphen '-' immediately followed by a letter. The entry is case sensitive. To override preset switches (e.g. from an environment variable) the form -+s can be used. Multiple switches may be grouped together after one hyphen (e.g. -af).

    Options with argument(s)

    If the command syntax requites an option argument it has to be supplied. Spaces between the option letter and the option argument are optional. If the argument string contains embedded spaces, it has to be enclosed in single or double quotes (e.g. -t 'Customers 1998'). If the option allows multiple arguments, they have to be separated by commas or colons without intermediate spaces. The first delimiter encountered becomes effective for all of the remaining arguments (example -r 15:LaserJet). Some of the CSS utilities use multi letter option names (e.g. etr(U)). Such options require at least one space between the name and the argument value (e.g. -e20 arg).

    Special options

    To terminate an option list, the user may enter two hyphens '--'. This allows to include files whose name start with a hyphen.
    Some programs have numeric options. In such a situation the option name and the option argument can be viewed as the same entity. These options may occasionally also allow a plus sign as the delimiter character (e.g. cssdate +7).
    All of the CSS programs include an option -help which will display a short summary of the command syntax and the possible options.

  • file

File arguments are optional. All utilities that expect file name arguments will substitute standard input if no such name has been entered. A single hyphen '' will be interpreted as standard input or standard output depending on context. As an example, the command line etr f2 | lpr f1 - f3 will feed the file f1 followed by the file f2 which has been preprocessed by etr(U) and finally the file f3 into the spooler administration.

Many CSS programs do allow options to be specified remotely. In the following example we will use the lpr(U) program to illustrate the various ways to control execution. The later an option is processed, the higher is its priority. This means that from multiple definitions of the same option, the most recent will be effective.

Source | Description
$HOME/.lprrc | The users home directory may contain a file named .lprrc (dot - lpr - remote-control). If such a file exists, all the options it contains will be considered as if they had been entered on the command line. The file may contain several lines and lines starting with the number symbol '#' are treated as comment.
LPROPT | If the shell environment has an exported variable with the name LPROPT (lpr options), its content will be included in the command line.
lpr command line | see above
Input file | CSS allows to specify options within the spooler input files (document embedded control). For a detailed description see CSS(P).
1.7. Support, Feedback

Most of the problems that might arise with the use of CSS may be solved by careful reading of this manual. The chapter Utility Descriptions contains all the information needed for normal operation. The chapters Installation and Configuration are the primary source of information to set up the CSS environment and the chapter Programming serves the software developer as a reference on how to integrate CSS features into their applications. Additional information will be supplied through Release Notes, Technical Notes or may be found in the READ.ME file.

If however you cannot solve your problem with the documentation supplied, you should consult the support department of your software dealer.

It was our desire to make this document as complete, accurate and useful as possible. However, it is inevitable that errors will exist and improvements can be made. We can only serve you better if you take the time to notify us, preferably in writing, of any errors, suggested improvements, or areas of confusion. Please contact us at the address given in the Unitec license agreement.


Copyright

Copyright / Trademarks

Copyright © 2000 by Unitec Informatik. All rights reserved.

Information in this document is subject to change without notice and does not represent a commitment on the part of Unitec Informatik. The software described in this document is furnished under a license agreement or nondisclosure agreement. The software may be used or copied only in accordance with the terms of the agreement. It is against the law to copy the software on any medium except as specifically allowed in the license or nondisclosure agreement.

Unitec Informatik
Thomas Madörin
Leerüti 797

CH-8625 Gossau

Switzerland

Unix is a registered trademark of AT&T Bell Labs Incorporated.
Unitec is a registered trademark of Unitec Informatik, Switzerland.
Windows and Windows NT are registered trademarks of Microsoft Corporation


License

Unitec License Agreement
Important Notice:

Please read this license agreement carefully before installing the enclosed CSS software! By using this software you indicate your acceptance of the Unitec license agreement.

This is a legal agreement between the user of the product CSS-Spooler (CSS for Unix, CssNT and WinCss) thereafter called User, and

Unitec Informatik
Thomas Madörin
Leerüti 797

CH-8625 Gossau

called Unitec and covers all parts of the software and its documentation.

By installing and/or using the enclosed software, you are agreeing to be bound by the terms of this agreement. It includes all component parts of the CSS Software such as libraries, executables, user interfaces, source components and all associated documentation, jointly referred to as Products.

Unitec Informatik (Unitec) grants you (User) the limited right to use one (1) copy of the enclosed Product in object code on a single terminal connected to a single computer. Multi terminal licenses are available from Unitec. This agreement supersedes all prior agreements, proposals, and representations between you and Unitec regarding: 1) the Unitec Software contained in this package; 2) earlier releases of this Software and; 3) all accompanying written materials, including any prior written agreement or any agreement in the manuals.

  1. You may use the Products to develop computer programs in compiled, linked, executable form (your Application Programs), provided none of the programs constitute either a spooler system or a communication management product which could be used to commercially compete with any Unitec product currently available. You may not delete Unitec copyright notices from your Application Programs. You may use the Products only with the type of operating system specified on the media labels. Other licenses must be obtained form Unitec for development in other environments.

  2. If the Product label specifies a multi-user operating system, the Product may be used by the same number of users and/or programmers as the number granted by your serial number and activation key combination, provided they all use the same, single Central Processing Unit (CPU). For single user operating systems, you must obtain a license for each CPU (effectively each user, programmer or workstation on a network) on which the Product is used, whether in source code or object code.

  3. You may modify and compile the Product source code, if supplied, provided you do not delete copyright notices. All modified versions are part of the licensed Products subject to this agreement and the property of Unitec. All modifications of, partial replacements of, and extensions of Unitec source code must be delivered to Unitec upon written request. If you compile the source code for use with an operating system other than specified on the media labels, you must license another copy of the Products, specifying that operating system, or obtain a special license from Unitec for that operating system, even if you intend to use both versions on only a single CPU.

  4. You agree to indemnify, hold harmless, and defend Unitec form and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of programs distributed under this license, including any claim that Application Programs which you created under this license infringe any rights of any third parties.

  5. The Products contain proprietary and confidential information. You must keep the Products in strict confidence and ensure that anyone with access to the Products refrains from unauthorized reproduction or disclosure. All copies of the Products, including written materials, are protected by national copyright laws and international treaty provisions and are owned by Unitec or its suppliers. You may not use, reproduce, modify, distribute, disclose, or transfer the Products, except as allowed by this license. You may make a reasonable number of copies solely for working, backup, or archival purpose, provided you use only one working copy at a time for each licensed CPU. You may not copy the written materials accompanying the Products. You may not sell, sublicense, rent, lease, assign, give, or transfer any Unitec end user license or Product. Your obligations under this agreement survive any substitution and/or termination of the licenses granted by this agreement.

  6. The license granted herein may be terminated by returning or distroying all copies of the Products materials within your control and so notifying Unitec in writing. The above licenses, including your right to use the Products, will terminate automatically if you infringe Unitec copyrights or breach this agreement. Unitec may suspend or terminate the above licenses, with 30 days prior notice and opportunity to cure, if you fail to pay any amount due Unitec or any Unitec distributor, dealer, or subsidiary. Termination of the above licenses neither impairs third party rights in programs lawfully distributed prior thereto, nor does such termination affect other obligations under this agreement.

  7. Unitec warrants that the Products have been accurately recorded on the media and that the media contain no defects. If you return any medium which does not meet this warranty to the place where you obtained it within 30 days from the date of shipment, Unitec or its reseller will repair or replace the medium without charge. Unitec disclaims all other warranties, either express or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose, and all other remedies for breach of the above warranty. You assume all risks with respect to the accuracy, adequacy, quality, reliability, and performance of the products. All implied warranties which may not be disclaimed are limited to 30 days.

  8. In no event shall Unitec, its resellers, or suppliers be liable for any damages whatever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use this product, whether in an action based on contract or tort, including negligence or strict liability, even if Unitec has been advised of the possibility of such damages. Any liability of Unitec is limited in the aggregate to amounts paid to Unitec for this Software and license.

  9. Whenever possible, each provision of this agreement shall be interpreted in such manner as to be valid and effective under applicable law. If any provision is invalid, the remaining provisions remain enforceable.

  10. The laws of the Kanton Zürich, Switzerland, control this agreement. It is enforceable by Unitec and/or its distributors and dealers. Disputes will be finally resolved by arbitration pursuant to uncitral rules of arbitration and conducted in Zürich, Switzerland. The arbitration will be conducted, at Unitec’s option, either in English or German by one arbitrator. The prevailing party in any action related to an alleged infringement of Unitec proprietary rights is entitled to recover its costs and expenses, including reasonable attorneys’ fees.


Installation

Chapter 2 - Installation

2.1. Overview
2.2. Unix Installation
2.3. Windows NT (CssNT) Installation
2.4. Windows Client Installation
2.5. Installation Programs
2.1. Overview

This chapter provides the information necessary to get started using CSS. The setup program also allows you to remove an old CSS version while upgrading to this release. Information about the installation and basic configuration is presented in a cookbook manner. For detailed configuration information, please refer to chapters 3, Program descriptions and 4, Configuration.

If you upgrade from an earlier version of CSS, all the control files in the directory /etc will be preserved. First time installations will install a minimal configuration with one dumb printer on device /dev/lp. To use the full power of CSS however, requires you to properly define the local environment in the configuration files.

Note!

All Unitec products require the license manager ULM to run properly.
The setup(I) program for the Unix CSS software will install all components in the proper locations.

2.2. Unix Installation

As a first step, an empty directory has to be created on the hard disk of the target system to install all the CSS files. Throughout the following sections we use the directory /tmp/css as the base for the installation. If you prefer to choose another directory, you should substitute the default name with the your selection.

login as root
mkdir /tmp/css

Next, the data on the distribution media must be stored in the /tmp/css directory on your hard disk. Normally Unix CSS is shipped on 3½" MS-DOS DD or HD diskettes. Special formats are available upon request:

3½" DD or HD diskette, Unix tar(1) format
5¼" MS-DOS format, 720KB or 1.2MB
5¼" 96 Tpi, 720KB or 1.2MB, Unix tar(1) format
QIC 24 tape cartridge, Unix tar(1) format

MS-DOS Format

MS-DOS diskettes contain one file css.tar or css.tzr. This file has to be transferred to the Unix file system. Several methods are possible. If you are using PC/TCP, Pathworks or PC-NFS the standard DOS copy command can be used to copy the software to any mounted Unix device. If you are using ftp, you must use binary transfer mode. Some Unix implementations provide a command to read DOS diskettes (e.g. SCO doscp -r).

Important!

Some copy utilities distinguish between text and binary files. The CSS files have to be transferred in binary mode in order to prevent any cr/lf conversions. As an example, the SCO doscp command must be used with the r-option and ftp must be set to binary mode.

Once you have copied the CSS software to your /tmp/css directory, login as root and change to it (cd(1) command). If the suffix of the filename is .tzr, use the following shell commands:

mv css.tzr css.tar.Z
uncompress css.tar

To extract all files use:

tar xvf css.tar

If the tar(1) command reports a Directory checksum error, try:

dd if=css.tar conv=swab | tar xvf –

Important! Before you upgrade from a previous CSS version, we urge you to save your data! If you do not want to perform a full save, make sure that you are able to rollback to your current version in case of installation problems. For this, you need your current software including the setup program, a save of the CSS base directory (normally /usr/lib/css) as well as a save of your reports in the CSS spool directory (normally /usr/spool/css). Unitec can not be made responsible for any damage caused by installation problems. Please also read the Unitec License Agreement.

You are now ready to run the setup program:

./setup

Note: If you are upgrading from a previous CSS version with WinCss clients, you must stop and restart the cssws(U) program. Since the invocation of this server process at boot time may be configured in several different ways (see WinCss(C)), setup(I) is unable to perform this action automatically. Please use ps(1) to get the process id (look in the PID column) and kill(1) to stop the (old) program. Then restart the new version as usual. If you implemented cssws(U) in /etc/inittab(4) the new server will be respawned by the Unix init(1) process immediately after the old program has been stopped without any user interaction. Failing to start the newly installed Windows server will most likely result in a version conflict or a protocol conflict error on the client systems. Although not very Unix like, you can of course also choose to reboot your server system.

Unix Format

If your distribution media is in Unix format, use the tar(1) command to extract the CSS files:

tar xvf /dev/x

where /dev/x is the device name of the drive required (e.g. /dev/tape, /dev/ct0, /dev/fd, /dev/fd0135ds18). If you are unsure about the device name, pleas consult your Unix manual. Some systems define a default device for the tar(1) command, so just tar xv may do the job.

If the tar(1) command reports a Directory checksum error, try:

dd if=/dev/x conv=swab | tar xvf –

If just one file named css.tar.Z is extracted use:

uncompress css.tar
tar xvf css.tar

and then

./setup

Setup

After calling the CSS setup(I) utility, just follow the on screen instructions. For a detailed description of this program, please refer to the program documentation later in this Chapter.

The contents of the various directories after successful installation is listed below:

Name | Contents
/etc | Configuration files css.* and ulm.default. Programs csa(U) and ulm(I).
/usr/lib/css | Default CSS base directory as defined by CSS_BASE_DIR. Will hold the CSS databases, a copy of setup(I) for potential uninstallation and internal information.
support | Subdirectory of CSS_BASE_DIR: read.me and other support files.
/usr/lib/ulm | Default ULM base directory as defined by ULM_BASE_DIR. Will hold the ULM database ulm.dat, a copy of setup for potential uninstallation and internal information.
support | Subdirectory of ULM_BASE_DIR: read.me and other support files.
cwd | CSS files, sample programs and functions.

After the download of the software, you may find additional information on CSS in the READ.ME file.

This concludes the basic installation and configuration. Many parameters may be set to change the behavior of the CSS software. The description of the configuration files can be found in the remainder of this manual.

Note!

In order to run the server program cssws(U), you will have to configure your TCP/IP network. Please consult the appropriate sections in Chapter 4, Configuration.

2.3. Windows NT (CssNT) Installation

The installation procedure of CssNT follows the usual Windows guidelines. All information required will be prompted by the setup program.

login as Administrator
start the Setup program

The CssNT software is shipped as self extracting ZIP archive or on floppy disks.

Setup

The CssNT setup program will guide you through each step of the installation process.

The contents of the various directories that are created in the CssNT folder during installation is listed below:

Name | Contents
etc | Configuration files css.* and ulm.default. Programs csa(U) and ulm(I).
lib | Default CSS base directory as defined by CSS_BASE_DIR. Will hold the CSS databases, a program for potential uninstallation and internal information.
support | Subdirectory of CSS_BASE_DIR: ReadMe.txt and other support files.
ulm | Default ULM base directory as defined by ULM_BASE_DIR. Will hold the ULM database ulm.dat and internal information.

This concludes the basic installation and configuration. Many parameters may be set to change the behavior of the CssNT software. The description of the configuration files can be found in the remainder of this manual.

Quick configuration

The configuration files can be found in the directory etc. You have to make sure, that each printer in the file etc\css.devices has a dv parameter specified. The printer devices must be given in Universal Naming Convention (UNC):

//host-name/printer-share-name

Please note, that in css.devices(C) all file names must be entered using the Unix directory separator '/'. The colon ':' after the drive letter, must be preceded by the backslash '\' (BS). Failing to do so would cause CSS to assume the end of the parameter entry:

C\:/dev/printer1

The setup program installs a printer with dv=C\:/CssDev1.txt. Therefor, output will be directed to the disk file C:\CssDev1.txt.

Changes in etc\css.devices and etc\css.forms are active after successful compilation through csa(U) only.

Where to find error information

If you encounter errors during CssNT operation, you should start the NT Event Viewer and check the Application Log for software messages. Information may also be found in the file lib\CssErrlog.txt.

If CssNT fails to operate correctly, use the Services applet in the Control Panel to check if the CssNT process is active. This service can be started manually if necessary.

2.4. Windows Client Installation
  • Start MS-Windows and insert the WinCss Setup diskette into drive A:
  • In the Program Manager choose File - Run
  • Enter a:\setup and hit <Return>

Configuration information can be found in WinCss(C).
2.5. Installation Programs

This section contains descriptions of the CSS installation programs in alphabetical order. The page headers for the descriptions contain the name and a brief description of the utility.

The Synopsis section contains the command line syntax, showing all possible options and arguments.

The Description section explains the purpose of the utility and any command line arguments.

The Options section explains each of the possible command line options.

Where applicable, program configuration details are listed in the Configuration section.

Program | Title
setup | Product Installation.
ulm | License Manager.


Setup

CSS Installation

setup(I)
Synopsis Description Options Notes Files See also

Synopsis

setup [-t] [-v]

Description

Setup installs or uninstalls the CSS software on the target Unix system. Prior execution, the software distribution files have to be copied into a working directory such as /tmp. For details, please consult the appropriate sections earlier in this chapter.

When invoked, the setup installation program will startup in interactive mode.

Main menu (first invocation):

CSS 4.00 Setup Program

Commands:
1 - Install CSS
q - Quit

Enter Command:

Main menu (subsequent invocations):

CSS 4.00 Setup Program

Commands:
1 - Reinstall/Update CSS
2 - Uninstall CSS
q - Quit

Enter Command:

Choosing items will open a submenu or a request to enter installation parameters. On each menu level, entering 'q' or just hitting <Return> will get you back one level or terminate the program respectively.

Selection 1 installs or updates the CSS software. Setup will check for the presence of all files of the distribution media in the current working directory. If files are missing, setup will terminate with an error message. Please follow on screen instructions.

Selection 2 uninstalls the CSS software from the system. Some files will be reported to be left unchanged. To completely remove CSS, use the rm(1) command to manually delete the reported files. If a later reinstallation is likely, the conserved files will ease the future setup process.

All the actions performed by setup are logged in the file setup.log.

Options

-t | Test option. Using this option logs all actions in setup.log, but does not perform them.
-v | Show software version information.

Notes

Due to the long version history of CSS, attempts of setup to recover statistical report information from the queue control file have been dropped. Queue recovery form the spool directory works as usual.

After successful execution of setup, the final configuration should be done:

• Upgrading from a previous CSS version

Upgrading with a cssws(U) server program running needs special attention. Since cssws may be invoked from /etc/inittab(4), it is not possible for setup to remove the file. Also killing the process would not help, since the repawn option would cause init(1) to immediately start another copy. The setup program will rename cssws to cssws.old. After the installation, use ps(1) to locate the process id (PID) of cssws and then kill(1) to stop it. If cssws is registered in your /etc/inittab, the new version will be started automatically. If you use another method to start the Windows server process (e.g. through /etc/rc), you can restart it manually. The cssws program is located in the CSS base directory (normally /usr/lib/css).

• Deactivate original UNIX spooler

In most systems CSS can coexist with the original UNIX spooler. If special preparation is needed, additional information will be supplied in an Installation Note.

• Device Definition

The basic control parameters will set up CSS to use /dev/lp as output device. With the dv-parameter in css.devices(C) any device- or disk file may be defined as output channel. If you decide to use /dev/lp and such a device does not exist, the major- and minor device numbers must be known to properly create this special file. If no system configuration manual is at hand, you may follow the procedure below:

ls -l /dev/tty* example output:

crw-rw-rw- 1 root 1, 0 Jan 16 13:27 /dev/tty
crw-rw-rw- 1 root 0, 1 Jan 18 08:24 /dev/tty2
crw-rw-rw- 1 root 0, 2 Sep 14 09:32 /dev/tty3
...
crw-rw-rw- 1 root 0, 7 Aug 30 17:11 /dev/tty8

The first number after the owner name (here root) is the major and the second is the minor device number.

If as an example printer 1 shall be installed on the port /dev/tty8 (the same port you could install terminal 8).

/etc/mknod /dev/lp c 0 7 # 0 = Major / 7 = Minor

To prevent login messages, no getty(1) process should be active on this port. On Xenix and UNIX Version 7 this may be done by deleting the corresponding line in the file /etc/ttys (as an alternative you may set the first character to '0' (zero):

02tty8

Xenix systems feature the utility program disable(1) to just achieve this. On UNIX System V the corresponding getty-line in /etc/inittab has to be deleted or modified:

t08:1:respawn:/etc/getty /dev/tty8 ...

delete or change to:

t08:1:off:/etc/getty /dev/tty8 ...

To set special line attributes like baud rate, parity, number of stop bits and so on, the CSS utility setmode(U) may be used.

• Name Conflicts

If the setup program detects name conflicts, the existing lp- and lpr programs will be renamed to lp.unix and lpr.unix. You will however be prompted to choose different names for the CSS lpr program and thus preserve the original UNIX names.

• Integrity

To ensure a permanent, consistent operation the following line has to be added to the file /etc/rc:

csa -S >/dev/null

• Integration

CSS is operational immediately after installation (using /dev/lp). To take advantage of all the features of your printers, the device database /etc/css.devices must be extended as described in css.devices(C). To ease this task, several examples of well known printer models are redefined.

At least the standard form A has to be defined in the forms database /etc/css.forms. These parameters should be adjusted to the paper size most often used. Any changes become active after a successful compilation by csa -f.

To install additional printers, please follow the procedure below:

  1. Printer definition in /etc/css.devices:

    e.g. 2|Printer 2:dv=/dev/tty5:# Device '/dev/tty5'
    Compilation of the device database with csa -d

  2. Install the connection Printer « Device

    If the device specified in the dv-parameter does not exist, the major- and minor device numbers of the port in question must be determined (as outlined above) and the special file has to be created with /etc/mknod(1). CSS will not be able to send output to a device, if e.g. cat /etc/passwd >/dev/tty5 fails.

The user-interface program css(U) uses the terminal definitions of /etc/termcap(5). The environment variable TERM should hold the correct id and must be accessible (sh(1) / export). If the screens do not show correct, the definitions in /etc/termcap(5) must be checked. Please especially review the following values:

Table 2-1: Termcap Names

bc | Control sequence for 'Backspace', if not <Ctrl>-H.
cd | Control sequence to clear the screen from the current position to the bottom (clear to end of display).
ce | Control sequence to clear the screen from the current position to the end of the line.
CF | Control sequence to turn the cursor off.
cl | Control sequence to clear the screen and move the cursor to the home position.
cm | Control sequence for direct cursor movements (see termcap(5)).
CN | Control sequence to turn the cursor on (if CO is not defined / RM-Cobol standard).
CO | Control sequence to turn the cursor on (Microsoft standard).
co | Number of characters per line (css(U) requires a minimum of co#80).
do | Control sequence to move the cursor one line down.
ho | Control sequence to move the cursor to the home position. You can also use the cm sequence for line 1, position 1.
li | Number of screen lines (css(U) requires at least li#15).
pc | Padding character if different than 0x00.
se | Control sequence for the attribute 'normal video' (delete all attributes and set 'low intensity').
so | Control sequence for the attribute 'reverse, low intensity'.
ti | Control sequence to initialize the terminal.
te | Control sequence to invert initialization (reset).
up | Control sequence to move the cursor one line up.
us | Control sequence for the attribute 'underline'.
ws | Control sequence for the attribute 'high intensity'.
ys | Control sequence for the attribute 'blink'.

Table 2-2: Termcap Line Graphics

Gx | Definition of line graphics control by Microsoft standard:
GS | Graphic-Start (enter line graphic mode)
GE | Graphic-End (exit line graphic mode)
GH | horizontal char
GV | vertical char
GD | down tic
GU | up tic
GL | left tic
GR | right tic
GC | junction char
G1 | upper right corner
G2 | upper left corner
G3 | lower left corner
G4 | lower right corner
gx | Definition of line graphics control by Unify standard (only applicable if the definition following the Microsoft standard is not present):
gs | Graphic-Start (enter line graphic mode)
gx | Graphic-End (exit line graphic mode)
gk | horizontal char
gj | vertical char
gn | down tic
go | up tic
gl | left tic
gm | right tic
gi | junction char
gg | upper right corner
gf | upper left corner
ge | lower left corner
gh | lower right corner

To make the css(U) program to use special line graphic characters you need to define the GS, GE and GH termcap capabilities. The following table lists some of the values of these capabilities for the most commonly used terminals:

Terminal | Definition
xterm | :GS=^N:GE=^O:GH=q:\ if this does not render the desired results, try:
xterm | :GS=\E(B\E)0\E(B\E)U^N:GE=\E(B\E)0^O:GH=q:\
linux | :GS=\E(0:GE=\E(B:GH=q:\
ansi | :GS=\E[12m:GE=\E[10m:GH=D:\
vt100, vt220 | :GS=\E(0:GE=\E(B:GH=q:\

Please note the line continuation character '\' at the end of each definition. It is added here for your convenience and allows you to use cut and paste. Make sure, that the pasted line is NOT the last line of your termcap entry or if so, remove the trailing backslash.

Files

setup.log

Program action log.

See also

csa(U), css.devices(C), css.forms(C),
      inittab(5), mknod(1), setmode(U), termcap(5),
      tty(4), ttys(5), ulm, ULM.DEFAULT(C)


Ulm

Unitec License Manager

ulm(I)
Synopsis Description Options Notes Files See also

Synopsis

ulm [-a key -c name [-d date] -p prod -r rel -s serno] [-v]

Description

The ulm program is the main control-unit in the ULM license management system. Its action is driven by the command line options or, if no options are specified, by user input in interactive mode. Batch serializing can be performed by specifying all of the a-, c-, p-, r- and s-options.

When invoked without options, the ULM license administration program will startup in interactive mode.

Main menu:

Unitec License Manager

Select Product:
1 - CSS Commercial Spooling System
2 - WinCss / CSS Windows Interface
3 - UDM Unitec Data Manager
q - Quit

Enter Selection:

Choosing items will open a submenu or a request to enter serializing parameters. On each menu level, entering 'q' or just hitting <Return> will get you back one level or terminate the program respectively.

After product selection, the next menu is visible:

Unitec License Manager

Commands:
1 - Serialize <Product>
2 - Set <Product> License Unit Assignment
q - Quit

Enter Command:

where <Product> shows the name of the product selected in the main menu.

Selection 1 enters the product serialization process (also called product branding). In order to successfully complete this section, please have your Activation Key ready. The following data has to be entered:

Prompt | Entry
Activation Key | This eight character key is used to verify all data entered. It consists of characters and/or digits and is not case sensitive, i.e. it may be entered in upper or lower case.
Serial Number | The product serial number consists of three parts, delimited by hyphens ‘–’. The first part represents the unique product number assigned to the customer, the second part identifies the license type and the third part shows the number of license units (i.e. the number of users allowed to work with the software). Missing parts use predefined defaults.
Company Name | The customer name. To prevent terminal compatibility problems, umlauts may be entered as ae, oe and ue.
Street Address | A missing street address must be entered as hyphen ‘–’.
ZIP / City | ZIP code and city name.
Release Number | Product release number.
Date Period | Used for time limited demo versions. This entry does not show for unlimited license types. The date must be entered in the format yyyymmdd–yyyymmdd

After all parts have been entered, individual modification is possible. To conclude the serialization process just hit the <Return> key.

Selection 2 allows the system administrator to predefine the users allowed to run the software. Each user identification consist of either the numeric client IP address (for Client-Server products such as WinCss and UCM) or the name of the invoking tty (for plain Unix products such as CSS and CssLib).

Manual assignments are however not required. On startup, each Unitec program locates its product entry in the license database and searches for the current user identification in all available license unit slots. If no such slot can be found, an automatic assignment to the first vacant slot is performed. When all slots have been used, execution of the software is not possible for unassigned user ids.

In rare circumstances, if the network layout or an IP address have changed, you can clear or modify the data stored in a license unit in this menu section.

Options

-a key | Activation key for batch branding.
-c name | Customer information. Three parts enclosed in quotes must be given 'Name:Street:City'. If the street address is missing, it must be entered as empty string 'Name::City'.
-d date | Optional date period yyyymmdd-yyyymmdd.
-p prod | Product name CSS, WinCss or UCM. Not case sensitive.
-r rel | Product release number.
-s serno | Serial number.
-v | Show software version information.

Notes

A special invocation of ulm is required to enter license information for virtual CSS environments. See VirtualServer(C) for an example.

Files

ulm.dat

License database, located in the ULM_BASE_DIR.

See also

ULM.DEFAULT(C), VirtualServer(C)


Utilities

Unitec Home Page

Chapter 3 - Utility Descriptions
3.1. Overview

This chapter contains descriptions of the CSS utility programs in alphabetical order. The page headers for the descriptions contain the name and a brief description of the utility.

The Synopsis section contains the command line syntax, showing all possible options and arguments.

The Description section explains the purpose of the utility and any command line arguments.

The Options section explains each of the possible command line options.

Program | Description
csa | Serves the system manager to handle all administrative tasks that concern CSS. Should not be used by the end-user nor to deal with day to day tasks.
css | Dialog program to control all areas of printing administration. This program is especially designed for the end-user.
cssdate | Utility to generate dates in the CSS format.
cssws | Windows server program.
csu | Batch version of css with extended functionality. Is aimed to the software developer.
etr | Utility program to insert CSS control sequences into text files.
fdu | Program to generate HP-LaserJet macros for extended forms creation.
lpdrestart | Administrator utility to reactivate blocked printer.
lpr | Spooler frontend to accept print jobs.
setmode | Utility to control the line discipline of printer ports.
ulp | Utility program to control special attributes on printers with reduced capabilities.
WinCss | Graphical Windows Interface program.


Csa

Administrator Utility

csa(U)
Synopsis Platforms Description Options Notes See also

Synopsis

/etc/csa option...
bin\csa option... (Windows NT)

Platforms

Unix, Windows NT

Description

Description The main purpose of the csa program is to perform all special tasks of the spooler administration. Its location and protection imposes the use by the system administrator root. All of the various reorganization options (-RDSK) should whenever possible be executed in single user mode. If this is not the case, precautions have to be taken, to ensure that the spooler is in an idle state.

Options

-a | Show the number of current active printers on standard output and as exit code (may be useful in shutdown scripts).
-d | Compiles the printer definition database /etc/css.devices.
-f | Compiles the forms definition database /etc/css.forms.
-i dev | Start printer dev if ready and print jobs available. (Printers that have been stopped with csu -s dev, will not be started by this option.)
-I | Starts all printers that are ready and prints waiting jobs.
-k date | Remove all printed reports from the queue whose keep-date is equal or older than date. (Date format: yyyymmdd / see also cssdate).
-K date | Remove all printed and unprinted reports from the queue whose keep-date is equal or older than date. This and the above function may be defined to take place automatically (see css.default(C)).
-l file | Show report file (UNIX file name) on the screen. Lines exceeding 80 characters are truncated.
-L file | Likewise / without reduction of the line length.
-x dev | Activate printer dev (This option activates all printers, event those who are on hold or are inactive and do not respond by any other reason). See also lpdrestart).
-X | Activate all printers.
-D | Initialize and if necessary reorganize the printer administration. If the device database has been corrupted, it cannot be reorganized. Rather it has to be removed by rm /usr/lib/css/dev (CssNT: del lib\dev)and recreated by csa -d.
-E file | Print report file file (Unix file name) on the standard output. (This action invokes a decompression and is mostly used to recover lost reports by the pipe csa -E file | lpr...).
-R | Initialize and if necessary reorganize the report queue. If the report database has been corrupted, it cannot be reorganized. Rather it has to be removed by rm /usr/lib/css/rep (CssNT: del lib\rep) and recreated by csa -R.
-S | Short cut for -RDi 1.
-U | Generates CSS recover commands for current report queue.
-y dev | Show device information for device dev.
-Y | Show device information for all devices.
-z form | Show form information for form form.
-Z | Show form information for all forms.

Notes

In most installations, csa will be executed in the file /etc/rc:

csa -RDK `cssdate` -i 1;
or, if the report administration with keep-dates is not used:
csa -S;

See also

cssdate, css.default(C), csu, lpdrestart, lpr


Css

User Interface

css(U)
Synopsis Platforms Description Options Notes See also Dialogue

Synopsis

css [-a] [-d devlist] [-f] [-l n] [-s] [-u] [-w] [-x] [-L lang] [-5]

Platforms

Unix, Windows NT

Description

The css program allows the end user to handle all administrative work of the print environment, such as status queries, form change, priority control and so on.

A user friendly dialogue supports the following main functions:

From change | Inform CSS about paper-changes and start optional print-test
Printer control | Stop printer, cancel printout, start printer
Report queue | Change report priority, hold, release, route, stop, view and delete report

The language of the CSS dialogue may be controlled by the L-option and the langenv and language parameters in CSS.DEFAULT(C). The first letter of the value determines the language:

d, D | Dutch
g, G | German
e,E, Default | English
f,F | French
i, I | Italian

The date format used in the dialog screens may be controlled by the environment variable DATETP in the same way:

AM, US | MM/DD/YY
IN | YY/MM/DD
EU, Default | DD.MM.YY

The language and date type may also be defined in css.default(C).

Options

-a | This option will cause the report queue to only show the reports that may be accessed by the user starting the program.
-d devlist | This option reduces the Printer Control screen to the devices specified in devlist. Devlist is a comma separated list of CSS device numbers. White spaces are not allowed in the device list. The option may be set on a per user basis in the ~/.cssrc file.
-f | Causes the dialogue to run in 'fast mode'. Whenever an user entry fills up its screen field, the program continues execution without the need of hitting the <Enter> key. This option is set by default.
-l n | Set the number of screen lines to n. The default is taken from the /etc/termcap entry 'li#'.
-s | Causes the dialogue to run in 'slow mode'. Each user entry has to be terminated by the <Enter> key.
-u | This option will cause the report queue to only show the reports with the same id as the user starting the program.
-w | Propose navigation default to wrap screens from last to first. This option may also be set globally in the WRAP_SCREEN keyword in css.default(C).
-x | Show report queue in reverse priority.
-L lang | Sets the language of the dialogue to lang. See also above.
-n | The 'Printer control' screen has an automatic monitor feature which updates the screen every n seconds. The default monitor time is 5 seconds. An entry of 0 (zero) disables the monitor feature.

Notes

The TTY number in the 'Report queue' screen corresponds to the last two characters of value returned by the function ttyname(3) (at report creation time) or the string co for /dev/console.
Printer Status | Description
*ready* | Idle, currently nothing to print
*active* | Printing a report
*busy* | The printer is currently in use by another virtual server or software product with integrated spooler. (See also el-parameter in css.devices(C))
*routed* | The printer is currently routed to the device the specified in the 'Print-job' column
*stop* | Currently printing, the printer will be stopped after the current printout.
*on hold* | The printer is stopped or may be off-line (parallel interface only).

In the report view screen, css compresses series of consecutive empty lines.

The screen handling of css is very well tested. If you encounter a strange behavior, you should check the terminal definition in /etc/termcap. Css will only run on terminals with direct cursor control. To enhance the appearance of your screens, you may want to enable line graphics in the termcap definition of your terminal. For further information and examples see the Notes section in setup(I).

Css options may also be specified in the file $HOME/.cssrc as well as in the shell environment variable CSSOPT. The evaluation order is described in the section 'Syntax of Command Lines' on page 1-7.

See also

csu, setup(I), termcap(5)

Dialogue

In order to keep the dialogue description as compact as possible, some of the following screen layouts are shown in a reduced size.

Main menu

CSS                Spooler maintenance      Date: 12.01.98
ID: root

           Action: 1 Form change
                   2 Printer control
                   3 Report queue
                   4 About CSS

        Selection: . (0 = Exit)

1. Form change
CSS-Spooler        Spooler maintenance      Date: 12.01.98
ID: root           Form change
Pnr Name                   Status           Form

1   Siemens PT 89          *ready*          L
2   Brother HL-8           *on hold*        A
3   Daisy M45              *active*         A

Selection: ... (0 = End)

The form change serves to inform the spooler about the change of paper. As a first action, the printer in question must be selected.

On the next screen, all possible forms are shown. The currently mounted form can be viewed in the status area.

By choosing a form, the assignment will be made and the printer will be activated.

CSS-Spooler        Spooler maintenance      Date: 12.01.98
ID: root           Form change
Printer:  2 / Brother HL-8
Form:     A / Zebra A4-Quer              Status: *on hold*
A   / A4 Landscape
B   / A4 Portrait
C   / A3 Landscape
G   / Giro-Formular
K   / Karteikarten A5
L   / Lieferscheine
M   / Mahnungen
P   / Paketetiketten
R   / Rechnungen/Gutschriften
VSR / VESR Einzahlungsscheine
Selection: ... (0 = End)

After selecting the form, a print test may be requested:

» Print test ? . (y/n)

If the answer was yes the size of the test may be specified:

» Number of pages: 1

2. Printer control

CSS-Spooler      Spooler maintenance        Date: 12.01.98
ID: root         Printer control
Pnr State        Print-job    Page/of    Copy/of    UID  T

1   *active*     Invoices     5/230      1/2        Mad  2
2   *on hold*
3   *ready*
Selection: ... (0 = End)

Depending on the printer state, the following actions may be chosen after selecting a printer:

  • Set printer on hold
  • Activate printer
  • Form change
  • Route current and future reports to another printer

    the next question is:

    » Redirect to printer: ...
  • Stop current print-job

    the next question is:

    » Save print-job for further printout ? . (y/n)

Hitting the <Tab> key will toggle between the normal and an alternative form of the device information.

To change the paper type, the printer referred should be put on hold to prevent the output of any print-job during the change. The proposed sequence is:

  1. Put printer on hold
  2. Change the paper type
  3. Accomplish the form change and optionally a print test

3. Report queue

CSS-Spooler        Spooler maintenance          Date: 12.01.98
ID: root           Report queue
No  Print-job      Frm St Pnr  Pages Cpy  Date   Time   UID

1   /etc/passwd    A   B           1   1  11.01  16:58  root
2   Kunden-Umsatz  A              48   1  12.01  14:24  Mad
3   Währungskurse  A               1   2  12.01  14:24  VN
4   Lieferscheine  L        2    107   1  12.01  11:55  BS
5   Invoices       I   P    1    230   1  12.01  15:08  Mad

> Frm Form / St State: P = printing, B = blocked / Pnr Printer

Selection: . (0 = End)

Depending on the report state, the following actions may be chosen after selecting a print-job:

  • Speed up printout
  • Redirect print-job

    the next question is:

    » Redirect to printer: ... (0 = any printer)
  • Delete report
  • Show report on the screen
  • Set report on hold
  • Restart/release report

    the next question is:

    » Start printout at page: 1
    » Stop printout after page: x
    » Number of copies: 1
    » Keep print job after printout: . (y/n)
  • Stop printout

    the next question is:

    » Save print-job for further printout ? . (y/n)

Additional actions are i to show more report information and s to enter selections for a reduction of the print-jobs shown. In the selection dialog, the entry a allows the user to perform actions on the selected group of reports. Delete operations will not affect reports with a keep-date set.

Binary reports (lpr B-option) and reports assigned to a binary mode printer may not be viewed on the screen. All others allow the following view actions:

Command | Action
a, HOME | show first page
z, END | show last page
+, PGDN | next screen
–, PGUP | previous screen
d, â | next line
u, á | previous line
g, p | go to page...
t, TAB | move view-window to the right or left border (toggle)
l, L, ß, BACKSP Move view-window left by:
Key | No. of positions
BACKSP | 1
ß | 5
l | 20
L | 40
r, R, à, SPACE Move view-window right by:
Key | No. of positions
SPACE | 1
à | 5
r | 20
R | 40
=, / search text: = case sensitive, / case insensitive
n | repeat last search
i | show report information
s | show / hide horizontal and vertical rulers (scale)
h, ?, HELP | show help
0, q | quit view

All of the above actions may be requested without using special keys. To provide the full command set, the file /etc/termcap must include the following definitions:

Termcap name | Control sequence sent by key...
kl | Cursor left
kr | Cursor right
ku | Cursor up
kd | Cursor down
kh | Home
ke | End
kp | Page Up
kn | Page Down
KH | Help (oder k1)


CssDate

Date Utility

cssdate(U)
Synopsis Platforms Description Options Notes See also

Synopsis

cssdate [-n] [+m]

Platforms

Unix, Windows NT

Description

Description The program cssdate writes the system date in the format yyyymmdd on the standard output. This is useful for shell scripts calling the programs lpr (k-option) and csa (K-option).

Options

-n | reduces the output date by n days
+m | increases the output date by m days

Notes

To establish a spooler environment in which each report will be kept until the morning of the day after tomorrow, you may do the following steps:

  1. Rename the lpr program:

    mv /bin/lpr /bin/lpr.css;
  2. A shell script /bin/lpr will take it's place:

    /bin/lpr.css -k `cssdate +    1` $@;
  3. In the file /etc/rc the program csa is called after the initialization of the system date:

    csa -RDK `cssdate` -i     1;

See also

csa, lpr


CssNTSrv

Windows NT Service

CssNTSrv(U)
Synopsis Platforms Description Options Notes Files See also

Synopsis

CssNTSrv [-i][-u]

Platforms

Windows NT

Description

CssNTSrv is the NT service process that controls the WinCss graphical interface program as well as output to all CSS printers (as does the lpd despooler on Unix systems). The program is automatically started at boot time.

Options

-i | Installs the program as Windows NT service. Normally this is done during the Setup process. The name shown in the Control Panel Services Applet is CssNT.
-u | Stops the service program and removes its entry from the Windows NT service manager.

Notes

If you encounter errors during CssNT operation, you should start the NT Event Viewer and check the Application Log for software messages. Information may also be found in the file lib\CssErrlog.txt.

If CssNT fails to operate correctly, use the Services Applet in the Control Panel to check if the CssNT process is active. This service can be started manually if nescessary.

On Unix systems the functionality of CssNTSrv is implemented in the programs cssws and lpd.

Files

lib\CssErrlog.txt

Service error log

See also

cssws, WinCss(C)


CssWs

Windows Server

cssws(U)
Synopsis Platforms Description Options Notes Files See also

Synopsis

cssws [-i]

Platforms

Unix

Description

Cssws is the server process for the WinCss graphical interface program. Typically it is invoked at system startup through /etc/rc(4) or /etc/inittab(4). Configuration details may be found at WinCss(C).

Options

-i | This option must be set, if cssws runs under the control of the inetd(1) super server.
-p port | Defines the TCP/IP port number to be used. The default value is 6801, or the value defined in the WINCSS_PORT parameter of css.default(C).
-r secs | Sets the information update refresh rate in seconds. If not set, a default of 5 seconds will be used.

Notes

Normally cssws is started by a standard system service:

/etc/rc

/usr/lib/css/cssws 2>/dev/null 1>&2

Unix System V only

The same service can be established on System V by inserting the following line in /etc/inittab(4):

cssws:1:respawn:/usr/lib/css/cssws 2>/dev/null 1>&2

Internet Super Server (inetd)

Since the Internet Superserver inetd(1) requires to use symbolic service names, you must first edit your /etc/services file and add the line:

cssws   6801/tcp    # WinCss server

Then edit the /etc/inetd.conf file and add the lines:

# CSS Service
cssws stream tcp nowait root /usr/lib/css/cssws -i

Files

/usr/lib/css/css.errlog

Server daemon error log

See also

CssNTSrv, WinCss(C)


Csu

Spooler Utility

csu(U)
Synopsis Platforms Description Options Notes See also

Synopsis

csu [option...]

Platforms

Unix, Windows NT

Description

The program csu is designed to perform all the normal control functions of the spooler administration in batch mode. These functions include status queries, form change, priority control an more.

Options

-a | Show the number of current active printers on standard output and as exit code (may be useful in shutdown scripts).
-c rep:n | Change the number of copies of report rep to n.
-d | Show current printer states, standard format.
-D | Show current printer states, alternate format.
-E rep | Remove report rep from the queue (erase).
-f | Show a list of all the available forms.
-g r[:n] | Print report r starting at page n (go).
-h rep | Hold (nonprinting) report rep.
-H dev:r | Stop printout of report r on printer dev and put report on hold.
-i dev | Activate (initialize) printer dev (1..999 or device name)
-I | Activate (initialize) all printers.
-k dev:r | Kill report r currently printing on printer dev. The parameter r has to be specified to prevent a different report to be killed.
-K d[:r] | Same as option k; the report number r is optional. Note that in a spooler environment things change rapidly. Not specifying the report number may kill another report than expected.
-l rep | Show report rep on standard output. Lines exceeding 80 characters are truncated.
-L rep | Show report rep without truncation of long lines.
-m dev:f | Mount form f on printer dev.
-o dev1:dev2 | Route all current and future reports for printer dev1 to printer dev2. Device routing can be cancelled by using the same value for dev1 and dev2, i.e. by routing the printer to itself.
-p f[:m] | Show number of lines and line length (in characters) of form f on the standard output. The modifier m serves to reduce the output to the number of lines (m=p) or the line length (m=l).
-q | Show current report queue. This is the default option and is mostly used to get the correct report numbers for other csu options.
-Q | Show current report queue in an alternate format with program name (lpr p-option) but without TTY number and time information.
-r dev | Route report r to printer dev (0..999)
-R dev:f | Route all reports with form f to printer dev.
-s dev | Hold (stop) printer dev after current printout
-S dev | Kill current printout and hold printer dev
-t | Show current report queue in a format that includes keep dates.
-T | Show all current reports that have their keep date set.
-w f | Delete all accessible reports with form f.
-W | Delete all accessible reports. Warning: calling csu -W with root permission will remove all pending reports!
-x f | Delete all accessible reports with form f. In contrast to the w-option, keep dates are ignored.
-X | Delete all accessible reports. In contrast to the W-option, keep dates are ignored. Warning: calling csu -X with root permission will remove all pending reports!
+ rep | Put report rep to the front of its form queue (highest priority).

Notes

The default option is -q.

The report number that has to be specified in some of the above options is assigned internally by CSS (in loose order) and may be obtained with a call to csu with the d- or q-option.

Information shown by using options d and D:

D | logical device number (1..999)
F | current form mounted
Status
**waiting** | ready, waiting for work
**on hold** | stopped (also 'off-line')
**locked** | locked (external lock file)
**starting** | starting a printout
**report nn** | active / printing report nn
**routed** | device routed to the printer specified in the 'Report' column
Report | report description (if set in the lpr t-option)
No | report number (if printer is active)
Who | user-id (or lpr e-option)
TT | TTY number (terminal)
Program | program name (if set in the lpr p-option)
Date | system date (MMYY) of the report creation
Copy | number of copies (printed : total)
Page | number of pages (printed : total)

Information shown by using option f:

F | form name
D | logical device number (0 = any printer)
PP | page parity (yes/no)
PS | number of lines per page (at 6 LPI)
LL | number of characters per line (at 10 CPI)

Information shown by using options q and Q:

F | form
Report | report description (if set in the lpr t-option)
No | internal report number (to be used in some options)
Status: | ' ' | unprinted
 | 'P' | printing on device D
 | 'H' | on hold / stopped
 | 'K' | printed / keeping (lpr -k date)
D | logical device number (0 = any printer)
Who | user-id (or lpr e-option)
TT | TTY number (terminal)
Program | program name (if set in the lpr p-option)
Date | system date (MMYY) of the report creation
Time | report creation time (HH:MM)
Cpys | number of copies
Page | number of pages

Information shown by using options t and T:

F | form
Report | report description (if set in the lpr t-option)
No | internal report number (to be used in some options)
Status: | ' ' | unprinted
 | 'P' | printing on device D
 | 'H' | on hold / stopped
 | 'K' | printed / keeping (lpr -k date)
D | logical device number (0 = any printer)
Who | user-id (or lpr e-option)
TT | TTY number (terminal)
keepdate | report keep date (if set with the lpr k or K-option)
Date | system date (MMYY) of the report creation
Cpys | number of copies
Page | number of pages

See also

csa, css, lpdrestart, lpr


Etr

Escape Translator

etr(U)
Synopsis Platforms Description Options Notes Examples See also

Synopsis

etr [-s] [-n] [-e1 x] [...] [-e127 x] [file...]

Platforms

Unix, Windows NT

Description

Etr reads each file in sequence and translates character strings x into the corresponding CSS control strings (e1: ESC,1 / e2: ESC,2 / ...). If no input file is given, or if a single dash (-) is given, etr read from the standard input.

Etr is designed to insert special characters used to control CSS devices into text files.

The s-option will cause etr to use a predefined standard set of input strings:

e1 | @1 | 10 CPI (characters per inch)
e2 | @2 | 12 CPI
e3 | @3 | 16.5 CPI
e4 | @4 | > 16.5 CPI (if supported)
e5 | +% | correspondence quality on
e6 | –% | correspondence quality off
e7 | +! | near letter quality on
e8 | –! | near letter quality off
e9 | +^ | elongated printing on
e10 | –^ | elongated printing off
e11 | +/ | Italic on
e12 | –/ | Italic off
e13 | +_ | underline on
e14 | –_ | underline off
e15 | +> | reverse half line (superscript)
e16 | –> | forward half line (reset superscript)
e17 | +< | forward half line (subscript)
e18 | –< | reverse half line (reset subscript)
e19 | +# | load alternate character set
e20 | –# | load primary character set

Options

-s | Use standard translation strings as listed above. This option behaves as if the corresponding e1..e20 options would have been specified on the command line. Starting with release 2.7, this option is set by default.
-n | Do not use the standard translation strings.
-e1 x | The string x (1 to 5 characters) will be translated to the control characters ESC,1. All the possible CSS escape codes -e2..-e127 may be defined in the same way. From multiple definitions of the same option, the last one is taken. If the first character of the string x is a caret '^', the following up to four characters will be translated only at the begin of a line. To define a leading caret by itself, it has to be defined as '\^'. To prevent the shell from interpreting meta characters, the string x should be enclosed by single quotes.

Notes

To protect your terminal from unwanted escape sequences, etr will not write its output on the TTY. This can however be forced by the pipe etr | cat.

Etr options may be also defined in the file $HOME/.etrrc as well as in the shell environment variable ETROPT. The evaluation order is described in the section 'Syntax of Command Lines' page 1-7.

Many capabilities of etr may also be achieved through the tr-entry of the device definitions. Etr however allows to define different sets of control-strings for each application.

Examples

etr -s <<!! | lpr
E = mc+>2–> / Copyright (C) 1916 by Albert +_Einstein-_ !
!!

Output:

E = mc2 / Copyright (C) 1916 by Albert Einstein!

etr -e13 '^.ul ' -e14 '^.ue ' <<!! | lpr
The following word shall be written in
.ul underlined
.ue mode.
!!

(Note: The first input line has a trailing space after the word 'in'.)

Output:

The following word shall be written in underlined mode.

etr -e17 '\^-' -e18 '\^+' <<!! | lpr
The formula for water is H^–2^+O.
!!

Output:

The formula for water is H2O.

See also

css.devices(C), ulp


Fdu

Form Definition Utility

fdu(U)
Synopsis Platforms Description Options FDU Commands Integration Notes Files See also

Synopsis

fdu [-I path] [-o file] [file]...

Platforms

Unix, Windows NT

Description

The program fdu translates the commands in all named files to HP LaserJet II control sequences. The standard input is read if - is used as a file name or if no input files are named. The result of fdu is written to file specified in o-option or to standard output, if no such option has been given.

By the use of the fdu-commands Macro and End_macro LaserJet programs can be defined. These programs may be activated by a subsequent Load-command and then be executed for each page printed. Only one macro may be active at any given time. Each Load-command implies the sequence unload; load #;. It is however possible to load different macros in sequence in the same printout (e.g. a page layout for statistics and an other one for a summary). By using the Include-command macro modules can be assembled.

LaserJet programming is similar to creating a screen layout. the various fonts and typefaces represent the attributes. The imaginary cursor may be positioned to any location with the Move-command. As a unit of measurement the so called point is used:

Points | Conversion
1 | 0.084666 mm
300 | 1 Inch / 25.4 mm
12 | ~ 1 mm
36 | 1 character at 8.3 CPI (horizontal)
30 | 1 character at 10 CPI
25 | 1 character at 12 CPI
18 | 1 character at 16.66 CPI
50 | 1 line at 6 LPI (vertical)
37.5 | 1 line at 8 LPI

Options

-o file | The argument given is the name of an output file to be used instead of the standard output.
-I path | Adds path to the list of directories to be searched when an include file must be found. More than one I-option may be defined. See also the Notes about FDUPATH below.

FDU Commands

Fdu recognizes the following commands:
b_include file | The contents of file is inserted at the current location without further processing by fdu. This command is useful to add a company logo that may have been created by a scanner producing LaserJet compatible files. If the filename contains special characters it has to be defined as string (i.e. enclosed in quotes like "logo.mac").
box y, x | Draws a rectangle of y vertical and x horizontal points. The line width used defaults to one point and may be changed by the line_points command. The cursor position remains unchanged.
charset id Changes the character set to be used for text output to id. The available character sets are defined in /usr/lib/css/fdu/charset:

ansi_ascii | ISO 6 ANSI ASCII
french_25 | ISO 25 French
german | HP German
german_21 | ISO 21 German
ibm_pc | IBM-PC USA
ibm_norw | IBM Norwegian
roman_8 | Roman-8

The corresponding alternate character sets have the prefix s_ (for secondary, e.g. s_ibm_pc).

copys #
copies # 		Sets the number of copies that have to be printed of each page.
cpi id Sets the character pitch (character per inch) to id. The available values of id are defined in /usr/lib/css/fdu/charpitch:

8 | 8.3 CPI
10 | 10 CPI
12 | 12 CPI
16 | 16.66 CPI
c_move [[{+|-}]y][,[{+|-}]x] | Moves the imaginary cursor to the character position with the coordinates y vertical and x horizontal (character position move). Relative moves may be performed by signed values. A negative sign moves y lines up or x characters left and a positive sign moves y lines down or x characters to the right. Missing values are substituted by the current coordinate and thus do not move in the corresponding direction. All other fdu positioning commands take typographic points (300x300) as arguments.
data d [[,] d]... This command is intended to define output data. The available parameter types for d are:
'abc' Text string abc. Strings follow the syntax of the C language to define special characters:
\a, \b, \f, \n, \r, \t, \v, \\, \', \", \xXXX, \OOO
where
XXX = 1..3 Hex-Zahlen
OOO = 1..3 Oktal-Zahlen
"abc" | Same as 'abc'.
123 | Byte (decimal 0..255)
0123 | Byte (octal 0..377)
0x12 | Byte (hex 0..ff)
ctl ASCII control character synonym:
Synonym | hex | Ctl
nul | 00 | ^@
soh | 01 | ^A
stx | 02 | ^B
etx | 03 | ^C
eot | 04 | ^D
enq | 05 | ^E
ack | 06 | ^F
bel | 07 | ^G
bs | 08 | ^H
ht | 09 | ^I
lf | 0a | ^J
nl | 0a | ^J
vt | 0b | ^K
ff | 0c | ^L
cr | 0d | ^M
so | 0e | ^N
si | 0f | ^O
dle | 10 | ^P
dc1 | 11 | ^Q
dc2 | 12 | ^R
dc3 | 13 | ^S
dc4 | 14 | ^T
nak | 15 | ^U
syn | 16 | ^V
etb | 17 | ^W
can | 18 | ^X
em | 19 | ^Y
sub | 1a | ^Z
e | 1b | ^[
esc | 1b | ^[
fs | 1c | ^\
gs | 1d | ^]
rs | 1e | ^^
us | 1f | ^_
sp | 20 | ^`
del | 7f |

The commas that separate data arguments are optional. The position of the imaginary cursor is moved to the end of the text generated by the data command.

eject | Perform a formfeed.
end_macro | Concludes the definition of a macro that has been initiated by a macro command.
font id Set the font for subsequent text to id. The available values of id are defined in /usr/lib/css/fdu/font:

i1 .. i18 | internal fonts 1 to 18
l1 .. l5 | left cartridge font 1 to 5
r1 .. r5 | right cartridge font 1 to 5
p1 .. p5 | download fonts 1 to 5

The corresponding secondary fonts have the prefix s_ (e.g. s_il).

gray id Selects the gray scale value to be used by the gray_box command. The available values of id are defined in /usr/lib/css/fdu/grayscale:

1 | 2%
2 | 10%
3 | 15%
4 | 30%
5 | 45%
6 | 70%
7 | 90%
8 | 100% (solid black)
light | 10%
medium | 30%
dark | 70%
gray_box y,x | Draws a filled rectangle of y vertical and x horizontal points. The default gray scale value is 2%, it may however be changed by the gray command. Unlike the box command, gray_box does not draw a surrounding border. The cursor position remains unchanged.
h_line x | Draws a horizontal line with a length of x points. The line width used defaults to one point and may be changed by the line_points command. The cursor position remains unchanged.
h_move [{+|-}]x | Moves the imaginary cursor to the horizontal position x (in points). Relative moves may be performed by signed values. A negative sign moves x points left and a positive sign moves x points to the right.
include file | The contents of file is inserted at the current location and interpreted by fdu. This command is useful to isolate often used definitions in procedure files. If the filename contains special characters it has to be defined as string (i.e. enclosed in quotes like "invoice.mac").
init | Initialize printer and reset internal variables to their default values.
italic {on|off} | Set italic font on or off.
landscape | Set printer to landscape format.
left_margin # | Defines the left margin in number of characters. The size of the margin is dependent on the current character size at the time of the left_margin command.
line_pitch id Sets the line pitch (lines per inch) to id. The available values of id are defined in /usr/lib/css/fdu/linepitch:

1 | 1 LPI
2 | 2 LPI
3 | 3 LPI
4 | 4 LPI
6 | 6 LPI
8 | 8 LPI
12 | 12 LPI
24 | 24 LPI
48 | 48 LPI
lpi id | Synonym for the line_pitch statement.
line_points # | Sets the line width for the box-, h_line- and v_line commands (in points).
lines # | Defines the page size in number of lines. The size of the page area is dependent on the current line pitch at the time of the lines command.
load # | Activates the macro number # and starts macro overlay. Load 0 terminates macro overlay and is identical with unload.
macro # | Start definition of macro number #. Each definition must be terminated by a end_macro command.
move [[{+|-}]y][,[{+|-}]x] | Moves the imaginary cursor to the point position with the coordinates y vertical and x horizontal. Relative moves may be performed by signed values. A negative sign moves y points up or x points left and a positive sign moves y points down or x points to the right. Missing values are substituted by the current coordinate and thus do not move in the corresponding direction.
page_size # | Synonym for the lines command.
pattern id Selects the pattern to be used by the pat_box command. The available values of id are defined in /usr/lib/css/fdu/pattern:

1 | horizontal lines
2 | vertical lines
3 | diagonal lines 1
4 | diagonal lines 2
5 | square grid
6 | diagonal grid
pat_box y, x | Draws a pattern filled rectangle of y vertical and x horizontal points. The current pattern has to be set by the pattern command. Unlike the box command, pat_box does not draw a surrounding border.
pitch id | Synonym for the cpi command.
points # | Sets the character size in points.
portrait | Set printer to portrait format.
pop | Moves the imaginary cursor to the location most recently added to the stack by a push command.
primary | Sets the primary character set for text output (default).
proportional {on|off} | Set proportional font on or off.
push | Save the current position of the imaginary cursor in a stack. Pushed addresses may be used in subsequent pop commands. The stack should not be overused. A maximum of about 10 save locations will ensure portability.
right_margin # | Defines the right margin in number of characters. The size of the margin is dependent on the current character size at the time of the right_margin command.
secondary | Sets the secondary character set for text output.
stroke id Selects the stroke weight to be used for text output. The available values of id are defined in /usr/lib/css/fdu/strokeweight:

light | light
medium | medium
bold | bold
stop | Stop the macro translation by fdu.
text d [[,] d]... | Synonym for the Data command.
text_lines # | Defines the size of the text area in number of lines. The size of the text area is dependent on the current line pitch at the time of the text_lines command.
top_margin # | Defines the top margin in number of lines. The size of the top margin is dependent on the current line pitch at the time of the top_margin command.
typeface id Selects the typeface to be used for text output. The available values of id are defined in /usr/lib/css/fdu/typeface:

caslon, courier, dutch, elite, gothic, helvetic, lp (line printer), orator, pica, present (presentation), prestige, roman, times roman, script, swiss

The corresponding secondary typefaces have the prefix s_ (e.g. s_pica).

underline {on|off} | Set underline mode on or off.
unload | Deactivates the macro overlay of a previous load command.
v_line y | Draws a vertical line with a length of y points. The line width used defaults to one point and may be changed by the line_points command. The cursor position remains unchanged.
v_move [{+|-}]y | Moves the imaginary cursor to the vertical position y (in points). Relative moves may be performed by signed values. A negative sign moves y points up and a positive sign moves y points down.
x_line x | Synonym for the h_line command.
x_move [{+|-}]x | Synonym for the h_move command.
y_line y | Synonym for the v_line command.
y_move [{+|-}]y | Synonym for the v_move command.
# comment | Comment up to the end of the line.

Fdu commands may be entered in free format and are case insensitive. Each command must be terminated by a semicolon ';'.

Integration

Fdu is designed to create and translate HP LaserJet programs. The results of the compilations should be stored in the Unix file system using special ordering criterions. CSS supports many such criterions which are suited to build an automatic macro management, where the spooler takes care of when to load the appropriate macros to the printer. The most important ordering variables for this purpose are listed in the following table (for a complete list, please see css.devices(C)):
%F | Form type (lpr f-option)
%S | Form subtype (lpr f-suboption)
%D | Device number (lpr d-option)
%L | LANG(UAGE) environment variable or lpr L-option
%N | Device name as defined in the dn-parameter of css.devices(C) or lpr d-Option
%P | Program name (lpr p-option)
%O | User ordering info lpr O-option
%T | Device type as defined in the dt-parameter of css.devices(C)
%V | Device file as defined in the dv-parameter of css.devices(C)

If e.g. a device definition in /etc/css.devices includes the begin-of-report parameter

bor=/usr/lib/css/macros/%L/%P.%F

and the printout was invoked by lpr -p prog01 -f b file, CSS will try to load the file /usr/css/macros/english/prog01.bB to the printer (assuming LANGUAGE=english). If no such file can be found, the bor parameter is simply ignored. As always, the lpr options may be embedded in the print file instead of defining them on the command line (see css(P)).

Each printout is processed in the following sequence:

  • Check current form mounted on the device / see also map- and xmap-parameters in css.devices(C).
  • Process all bor-parameters in the order of their definition in css.devices(C). Prior to any output, all ordering variables are substituted with their current values. If a bor-parameter starts with the character '/' and a file with the generated name exists, its contents is sent to the printer. Conditional bor definitions will of course be treated only if all conditions evaluate to true.
  • Generate the file name for if1 by substituting the current ordering values. If a file with the generated name exists, its contents is sent to the printer. (Note: The if- and of-parameters are supported for compatibility reasons. The identical functionality is provided by bor and eor respectively.)
  • Same for if2.
  • Print report.
  • Generate the file name for tf1 by substituting the current ordering values. If a file with the generated name exists, its contents is sent to the printer.
  • Same for tf2.
  • Process all eor-parameters. The same rules apply as for the bor-parameters.

Configuration example:

/etc/css.devices:

#
# Brother HL-8
#
1|HL-8 (HP):as:cr:pg:dv=/dev/lp:\
:map=a,b,c,d:\
:bor=\E\rH\EE:#set HP-emulation mode, reset device:\
:bor=/usr/lib/css_mac/%L/%P:\
:eor=\EE:#reset device:\
:e1=\E&k0S:#10 cpi:\
...
:e50=\E&f5x2y4X:#load macro 2:

Program prog_xy:

FILE *pFp, *popen();

/* open pipe to CSS */

if ((pFp = popen("lpr", "w")) == NULL)
{
    perror("prog_xy: popen lpr");
    exit(1);
}

/* write CSS instream options */

fprintf(pFp, "++CSS++ -f B -p prog_xy\n");

/* write report into file 'pFp' */
...
pclose(pFp);
exit(0);

Macro prog_xy:

#
# Fdu-Macro prog_xy
#
init; # initialize
landscape;
page_size 46;
macro 1;
    move 2300, 30; # 46 lines * 50,
                   # 1 char * 30
    h_line 540;    # 18 char * 30
    v_move +40;    # 4/5 line down
    text 'Printed by CSS/FDU';
end_macro;

#
# Final setup
#
top_margin 3;
text_lines 42;
left_margin 1;
right_margin 112;
load 1; # overlay on each page
#
# end macro prog_xyx

Compilation:

fdu -o /usr/lib/css_mac/german/prog_xy prog_xy

Notes

Many of the fdu commands are defined as macros in /usr/lib/css/fdu/commands. The rules to follow for extensions are documented at the beginning of that file. You may as well need to adjust the other parameter files in /usr/lib/css/fdu to reflect your local environment.
Fdu options may be also defined in the file $HOME/.fdurc as well as in the shell environment variable FDUOPT. The evaluation order is described in the section 'Syntax of Command Lines' page 1-7.
The shell environment variable FDUPATH allows you to define one or multiple path names of directories containing fdu include files. The names are separated by colons.

Example:

FDUPATH=/usr/fdu/include:/usr/css/include;
export FDUPATH

Files

/usr/lib/css/fdu

fdu control directory

See also

css.devices(P), lpr, HP LaserJet II User's Manual


LpdRestart

Restart Printer Daemon

lpdrestart(U)
Synopsis Platforms Description Options Notes Files See also

Synopsis

lpdrestart [-i dev] [-I]

Platforms

Unix

Description

The utility lpdrestart allows to reactivate printers that can no longer be controlled by css. This program should be used with extreme caution. Using it on active printers may cause reports to be lost. If no options are given, printer 1 will be restarted.

Options

-i dev | Start printer dev.
-I | Start all CSS printers.

Notes

After the execution of lpdrestart the printer(s) may have to be activated with the css or csu utility program. Lpdrestart will restart printers regardless of their possible on hold status.

Files

/usr/lib/css/lpd | despooler daemon
/usr/lib/css/dev | device database

See also

csa, css, csu


Lpr

Spooler Frontend

lpr(U)
Synopsis Platforms Description Options Notes Files See also

Synopsis

lpr [option]... [file...]

Platforms

Unix, Windows NT

Description

The lpr command arranges for the named files and associated information to be printed. If no names are specified on the command line, the standard input is assumed. The standard input may be specified along with named files on the command line using the file name '-'. The intermediate spool files are compressed by lpr and will be uncompressed by the despooler daemon lpd upon printout.

Options

-a

Automatic setting of the character pitch (CPI) for the longest line in the document to fit onto the current form.
-b text | Set banner page id to text.
-c n | Set number of copies to print to n (default 1). An entry of 0 (zero) will cause the report to remain in the queue and to be printed only after it has been released by the user through the csu or css program (report in 'hold' state, see also H-option). The option value will then however be set to the default value of 1, i.e. -c 0 is identical to -H -c 1.
-d dev | Print report on device dev. You may specify dev as logical device number (0..999) or as device name (see dn-parameter in css.devices(C)). A device number of 0 does not assign a specific printer and causes CSS to route the report to any available system printer (see as-parameter in css.devices(C)) that has the requested form mounted. If this option is missing, the device is taken from the entry default_device in CSS.DEFAULT(C), which itself defaults to 0.
-e mkz | Set employee-id to id (up to 8 characters, default login name). The employee-id will show in status queries through csu and css.
-f f[:s] | Set form type of the printout to f. All form names are case insensitive. The optional form subtype s (up to 3 characters) may be used as ordering value as described in css.devices(C) (bo x- and eo x-parameters). The subtype is not used by CSS. If this option is missing, the form is taken from the entry default_form in CSS.DEFAULT(C), which itself defaults to A.
-g group | Set the group id to group (name or ID). The default is to set the report group-id to the gid found in the /etc/passwd entry of the user creating the report or the user specified in the u-option.
-h | Suppress printing of banner pages.
-k date | Keep report in the print queue until date. The user may however delete the report at any time manually through csu and css.
-p pgm | Set program name to pgm (up to 14 characters). The program name will show in status queries through csu.
-r dev | Use device dev for report routing (default 0, see special notes below).
-t tit | Set report title to title. The report title will show in status queries through csu and css. The t-option is active for the first file named in the command line only. The default title for all files is the name listed in the file list and '(pipe)' for standard input.
-u user | Set user id to user. If no e-option has been specified this will also set the employee id to user. The option value may be entered as Unix user id or user name and must be defined in /etc/passwd.
-B mode This option will cause CSS to print the report in binary mode (i.e. without escape- and tr-translation) even if the target printer has not been defined as binary device (bm-parameter). The use of this option requires the definition of a device through the d- or r-option. After binary reports have been added to the report queue, they may only be routed to devices with the same device type defined (dt-parameter in css.devices(C)). Mode is constructed by adding numeric values and determines the output of the initialization and termination control sequences that have been defined for the target device (see also css.devices(C)). Each value that is included in mode will cause the corresponding control string to be sent to the printer. The following values are defined:
10 | bor | 01 | eor
20 | if1 | 02 | tf1
40 | if2 | 04 | tf2
-C cond | Set condition flags cond to the true state. Condition flags may be used to control activation of conditional bor-, eor-, bop-, eop-, bol-, eol- and tr-control strings (see css.devices(C)). Cond may be entered as a sequence of digits and letters (case sensitive) or as argument list as in a,b,c,B,1. Multiple C-options are allowed.
-H | Set report to the 'hold' state (see also c-option). This will cause the report to remain in the queue and to be printed only after it has been released by the user through the csu or css program.
-K ndays | Keep report in the print queue for ndays days. The user may however delete the report at any time manually through csu and css.
-L lang | Set the language ordering value to lang (up to 14 characters). This value may be used to control the generation of language specific initialization and termination filenames in the bo x- and eo x-parameters in css.devices(C) (see also fdu).
-O ord | Set the user ordering value to ord (up to 60 characters). This value may be used to control the generation of initialization and termination filenames in the bo x- and eo x-parameters in css.devices(C) (see also fdu).
-P n | Set the page size of the named reports to n lines. Normally lpr will determine the number of pages in a report by using the ps-parameter of css.forms(C) and the number of linefeeds and form feeds in the document. This information enables the user to plan the paper requirements or to cancel and reschedule the printout from a given page. Since the use of fdu-macros and/or bo x control strings may redefine the number of lines per page to a value that differs from the ps-parameter, the number of pages determined may be incorrect. The use of the P-option will allow to correct these errors. A value of 0 (zero) will cause lpr to only consider form feeds to determine the number of pages in the document. For a complete discussion of this option, see the notes below.
-S esc | Insert the CSS escape sequences esc at the beginning of the first page printed before bop (reminder: Start). These control strings will be translated to the values defined in the corresponding e x-parameters in css.devices(C) of the target device. Esc may be entered as argument list as in e5,e7,e30 (short format: 5,7,30). Multiple S-options are allowed.
-T esc | Add the CSS escape sequences esc at the end of the last page printed after eop (reminder: Terminate). These control strings will be translated to the values defined in the corresponding e x-parameters in css.devices(C) of the target device. Esc may be entered as argument list as in e5,e7,e30 (short format: 5,7,30). Multiple T-options are allowed.
-- May be used to indicates the end of the options. This allows you to enter file arguments with names beginning with the character '-'.

Notes

To calculate the line length of a document (a-option), lpr assumes tab positions at 9, 17, 25, and so on. Since changes of the line length through character translations (tr-parameter in css.devices(C)) happen at the time of the printout, they will not be taken into account.

The calculation of the number of pages in a document is dependent of several definitions and options. In normal operation, the ps capability of the form description in css.forms(C) defines the number of lines per page. This value may be overwritten by a positive, non zero P-option. An input page break occurs, whenever a formfeed character is encountered or the number of lines per page has been reached. A P-option value of zero (0), causes CSS to assume variable form length, where only formfeed characters trigger an input page break.

In a similar manner, the top of form processing of the lpd despooler daemon is controlled by multiple definitions and options. Again the ps capability of the form description or a positive, non zero P-option define the number of lines per page. Each page is preceded by the bop sequences and terminated by the eop sequences. An output page break occurs whenever a formfeed character is encountered or the number of lines per page are reached, i.e. a page overflow occurs. If the pg (page printer) flag has not been set for the device (css.devices(C)), the formfeed characters are not transmitted to the printer. Top of form positioning is accomplished by inserting the necessary number of empty lines. If however the pg flag is set, no empty lines will be generated and formfeeds are transmitted to the device. Page overflows do not insert an extra formfeed. The last page is guaranteed to be terminated with a formfeed. If each page should be terminated with a ff character, the :eop -f=...\f...: definition may be used. In either case, a P-option value of zero (0), causes CSS to assume variable form length, and page overflows do not trigger an output page break.

The use of -P 0 generates a potential problem. The variable $ (i.e. ‘last line’ as in :eol ($-3)=...:) is determined relative to the page size of the form definition (ps capability) and may thus be missing or out of sequence on pages with variable number of lines.

If a printer port cannot be opened, it will be put into the 'hold' state. On some system this will also happen with parallel ports, if the printer is 'off-line'.

Lpr options may be also defined in the file $HOME/.lprrc as well as in the shell environment variable LPROPT. The evaluation order is described in the section 'Syntax of Command Lines' page 1-7.

For compatibility reasons, the shell environment variable CSS is still supported. It is evaluated before the remote control file $HOME/.lprrc and has thus the lowest priority. We recommend however the use of the standard variable LPROPT. As an example, to always use the a-option, and to route output to device 2, you may enter the following command in your .profile:

LPROPT="-a -r 2"; export LPROPT;

or in the file $HOME/.lprrc:

-a -r 2

The lpr options are scanned in the following order:

1. | CSS shell environment variable
2. | File $HOME/.lprrc
3. | LPROPT shell environment variable
4. | lpr command line
5. | options embedded in the document

Thus the options in the remote control file have the lowest and the document embedded controls have the highest priority.

There are different ways to select a output device:

  • If the selected form class designates a particular output device (ld-parameter in css.forms(C)), the given device is selected. There is no way to overwrite this setting.
  • The use of the d-option follows the priority schema outlined above.
  • If the r-option is set and no printer has been assigned by the rules above, the device given in the option is used for printout.

Files

Css: |
/etc/css.banner | Banner page messages
/usr/lib/css/css.errlog | Despooler daemon error log
/usr/lib/css/lpd | Despooler daemon
/usr/lib/css/dev | Device Database
/usr/lib/css/forms | Forms Database
/usr/lib/css/rep | Report Database
/usr/spool/css/* | Spool Area
CssNT: |
etc\css.banner | Banner page messages
lib\CssErrlog.txt | Service error log
lib\CssNTSrv.exe | Service program (despooler)
lib\dev | Device Database
lib\forms | Forms Database
lib\rep | Report Database
spool\* | Spool Area

See also

csa, css, csu, cssdate, css.devices(C), fdu, lpdrestart, pr(1)


SetMode

Line Discipline Utility

setmode(U)
Synopsis Platforms Description Options Notes Examples See also

Synopsis

/etc/setmode [-w] dev stty-modes

Platforms

Unix

Description

Setmode sets certain terminal I/O options for the device dev. The main attributes you may want to set include baud rate, parity, number of stop bits and type of handshaking. Setmode uses the mode attributes of the command line to call stty(1) and then pauses forever. Unlike stty(1) the settings made remain active until the system is halted or another process changes the attributes. This program is especially useful to set attributes that cannot be defined in the device database css.devices(C).

Options

-w

Do not run in background (wait), rather stay attached to the invoking terminal. Without this option setmode will detach from the controlling terminal and run quietly in background without using any system resources. The w-option is especially useful if setmode is invoked through /etc/inittab(4) with the respawn option set (Unix System V).

Notes

Setmode can be stopped by the command kill -15 pid.

Examples

UNIX Version 7 / XENIX 3

This example sets the terminal I/O options of the device /dev/lp to Xon/Xoff handshaking, 8 data bits and 1 stop bit. The line should be included in the file /etc/rc(4):

/etc/setmode /dev/lp 9600 clocal -cstopb

UNIX System V

The same settings can be established on System V by inserting the following line in /etc/inittab(4):

lp:1:respawn:/etc/setmode -w /dev/lp 9600 ixon ixany cs8 -cstopb -opost
Important!

If you call setmode from within /etc/inittab(4) with the respawn option set, the use of the w-option is mandatory!

See also

css.devices(C), init(1), initab(4), stty(1), tty(4)


Ulp

Underline Utility

ulp(U)
Synopsis Platforms Description Options Notes Examples See also

Synopsis

ulp [-f] [-u] [-1] [file...]

Platforms

Unix, Windows NT

Description

The ulp is intended to insert CSS underline on/off escape sequences into text files generated by some old fashion text formatters and viewers. It processes the named files on the command line. If no names are specified, the standard input is assumed. The standard input may be specified along with named files on the command line using the file name '-'. Each underscore character '_' causes ulp to toggle underline on and off (initially off) and generates the CSS control Esc,13 (start underline) and Esc,14 (stop underline) respectively. Further more, ulp converts the nroff(1) controls 'reverse linefeeds' (Esc,'7'), 'reverse-' and 'forward half linefeeds' (Esc,'8' and Esc,'9') into standard CSS controls Esc,15 and Esc,17.

If the printer model in use is not capable to underline in one single print cycle (e.g. Infoscribe 1000), the u-option will instruct ulp to generate to lines to achieve the desired result.

Since some printer models do not process the backspace characters and thus prevent overstriking, ulp generates multiple output lines for each input line containing backspaces.

Some printer models allow so called emphasized printing but do not provide controls as e.g. 'correspondence quality' (e.g. Siemens PT 88/PT 89). On these printers emphasized printing has to be achieved through multiple print cycles. Ulp lets you specify the number of print cycles to generate for each line as an option.

Options

-f | Suppress conversion of 'reverse-' and 'half linefeeds'.
-u | Underlined text shall be printed in two cycles (sequence: text - cr - underscores).
-1 | Each line is printed n times to achieve emphasized printing (default 1).

Notes

Ulp is capable to process lines of up to 800 characters.

Ulp options may be also defined in the file $HOME/.ulprc as well as in the shell environment variable ULPOPT. The evaluation order is described in the section 'Syntax of Command Lines' page 1-7.

To protect your terminal from unwanted escape sequences, ulp will not write its output on the TTY. This can however be forced by the pipe ulp | cat.

Ulp is not suited for printers that generate an automatic linefeed with each cr character received.

To prevent misalignments, ulp counts all half linefeeds and tries to compensate unbalanced movements at the end of the document. This may under rare circumstances generate an additional empty page.

If the target printer is not capable to perform reverse half linefeeds, nroff(1) output should be filtered through col(1) before a call to ulp. Since CSS itself does not keep track of half line movements, no compensation will be done in these cases.

Examples

nroff -m an file | ulp | lpr

nroff -m s file | ulp -u -2 | lpr -d 2

See also

col(1), css.devices(C), nroff(1), ul(1)


WinCss Overview
Copyright

This Help file is the online reference for the Windows interface program WinCss. It provides complete description of all dialog elements and their contents.

To get extended information about the Unix or Windows/NT CSS utilities, functions and configuration tables, please consult the online manual which constitutes an integral part of the documentation.

The online manual is distributed with the server installation only. If missing, all navigation links to it will be silently ignored. You may then however want to download the manual from the Unitec Web site. Please refer to the Online Manual topic for download and installation instructions.

WinCss Features

  • Office Look and Feel
  • Drag and Drop operation
  • Context Menus
  • Report preview with full text search
  • Implemented with the widely used Unitec Communication Manager UCM
  • Install and Run, no additional configuration needed

CSS Features

Some of the main features of the CSS and CssNT server packages are:

  • Device independent programming
  • Database for printer and forms definitions
  • Form definition utility / laser printer macro administration
  • Easy to operate dialog program for complete user control and report preview
  • Embedded lpr options within the report files
  • Administration of multiple report queues
  • Report-Preview (preview of spool files, search capabilities)
  • Print test (paper adjust)
  • Report management with keep-date
  • Translation tables for characters and strings
  • Real multi-user capabilities
  • Compression of the spool files
  • Remote print support for the lpd, rtel, pros and raw protocols
  • Graphical interface for Windows workstations

Read the About WinCss topic.


About WinCss

The CSS package consists of a collection of programs and utilities providing sophisticated control of all printing activities on UNIX or Windows/NT systems.

Functionality and operation of CSS are specially designed to cover the needs of commercial applications.

The WinCss program described in this Help file provides easy control of the UNIX and Windows/NT print management software in the Windows client environment.

Ease of use of this program is unsurpassed. All tasks can be accomplished with your pointing device. You may choose your preferred navigation method among Drag and Drop, context menus, toolbars and double click or standard menu operation.


WinCss Manual Page
Synopsis Description Options Notes See also Files

Synopsis

WinCss [-m] [-h host] [-p port]

Description

With the help of the graphical Windows interface program WinCss, the end user can manage all administrative work of the CSS print environment, such as status queries, form change, priority control and so on. Operation of the program follows the usual Windows standards. Wherever possible, the right mouse button will open a popup menu for the given context. Spooler information is shown in data grids. Several grid cells allow to open a dialog window with a double click of the right mouse button. These fields are referred to as Data Field Buttons throughout the remainder of this document.

Many tasks can be accomplished by Drag And Drop operations. To do this, left click on an object and drag it with the mouse button pressed to the target object. By releasing the mouse button, a dialog window will open depending on context. As an example, you can initiate a form change by dragging a grid row of the Forms window onto a row of the Device window.

The following main windows are available:

Main Control | Main control window (Mini Toolbar) with buttons to open the data windows listed below.
Forms | Lists all forms defined in CSS.
Printers | Lists all printers defined in CSS. Actions include: stop printer, cancel printout, start printer, change mounted form.
Report Queue | Lists all the reports currently available in the queue. Actions include: change printout priority, hold, release, route, stop, view and delete.

The language of the WinCss dialogue may be selected in the menu View | Language. Other presentation objects like menu, status line and tool tips may also be turned on and off in the View menu. If the menu itself has been turned off, it can be reactivated by pressing the right mouse button over the toolbar.

Options

The following command line options are recognized by WinCss:

-h host | WinCss connects to the CSS server on the system with the IP address host.
-m | Normally WinCss starts up by directly jumping to the Report window. With the m-option you can open the Main Control window with the mini toolbar.
-p port | Defines the TCP/IP port number to be used. The default value is 6801, or the value entered in the program options. See also WinCss(C) and CssWs(U) in the Css online manual.

Notes

The slash '/ ' may be used as an alternate option character.

The Device windows indicates the following status information:
Printer Status | Description
ready | Idle, currently nothing to print
start | A printout is starting up
active | Printing a report
busy | The printer is currently in use by another software product with integrated spooler. (See also el-parameter in css.devices(C) in the online manual)
stop | Currently printing, the printer will be stopped after the current printout.
routed to dev | All output to the printer will be routed to the device dev.
off line | The printer is turned off. This condition can only be detected on certain interfaces.
inactive | The printer is stopped.

In the Report Preview window you may compress series of consecutive empty lines into one blank line.

When a grid row is selected with a left mouse click, its background color changes to a light yellow. Such selected items will be referred to as the current object in the remainder of this document (e.g. current report).

See also

Client Configuration, Connection Options, General Options

Files

Windows Registry WinCss configuration at
HKEY_LOCAL_MACHINE\SOFTWARE\Unitec\WinCss


Main Control

WinCss Unitec Home Page

X
X

Main Control (Mini Toolbar)
The Main Control window is your WinCss control center for limited screen real estate.

Toolbar Buttons
 Popup Menus
Toolbar Buttons
Button | Name | Description
 | Report Queue | In the Report Queue window, you can administer the reports currently available.
 | Printers | The Printer window lets you administer all devices defined in the CSS system.
 | Forms | This window lists all Forms known in the CSS system.
 | Options | Allows to set various program options.
 | Help | Starts Help at the Main Control section.
 | Exit | This button stops WinCss and closes all windows.
Popup Menus
Clicking the right mouse button in specific areas, opens a popup menu depending on context:
Area | Menu
Toolbar | Menu and toolbar on/off toggles.

See also General Options, Operation, WinCss Command | Back to Top


Report Queue
The Report Queue window lets you easily perform all report related tasks.

Toolbar Buttons
 Data Grid Contents
 Data Cell Actions
 Drag and Drop
 Popup Menus
Toolbar Buttons
Button | Name | Description
 | Printers | The Printer window lets you administer all devices defined in the system. This button is not visible, if the program has been started with the m-option.
 | Forms | This window lists all Forms known in the system. This button is not visible, if the program has been started with the m-option.
 | User selection | View own / all reports.
 | Outline view | Outline view mode allows grouping of the data by any criteria.
 | Release | Releases the current report for printout.
 | Print | Same as 'Release', but without initial dialog to fine-tune the print options.
 | Hold | Holds or stops the printout of the current report.
 | Accelerate | Puts the report to the top of the form queue. Note: reports can only be accelerated relative to the other reports owned by yourself.
 | No. of Copies | Starts a dialog to change the number of copies.
 | Route | Starts a dialog to route the report to another printer.
 | View | Shows the contents of the report in a separate window. This function is available in the 32 bit version only.
 | Delete | Deletes the current report from the queue.
 | Help | Starts Help at the Report Queue section.
 | Close | Closes the current window.
Data Grid Contents

Title | Cell Contents
No. | Report identification number. A red number indicates, that no access permission exists for this report.
Print Job | Report description, if supplied by the application program.
Frm | The form required to print the report.
Status | Report state such as ready, printing, on hold, etc.
PNr | Printer to which the report will be sent.
Pages | Number of pages in the document.
Copies | Number of copies to print.
Date | Report creation date.
Time | Report creation time.
UID | ID of the user that created the report.
Data Cell Actions
To initiate an action, double click in the following grid cells:
Data Field | Action
No., Print Job | Shows the contents of the report in a separate window.
PNo | Starts a dialog to route the report to another printer.
Status | Depending on the report state, the corresponding dialog (Release Report, Start Printer, Stop Printout) is started.
Copies | Starts a dialog to change the number of copies.
Drag and Drop

Drag Object | Drop Object | Action
Printer | Report | Depending on printer and report state, the corresponding dialog (Start Printer, Release Report, Route Report, Form Change) is started.
Report | Printer | As above.
Popup Menus
Clicking the right mouse button in specific areas, opens popup a menu depending on context:
Area | Menu
Toolbar | Menu and toolbar on/off toggles.
Grid Row | Opens a menu with selections equivalent to the toolbar.
Column Headers | Show or hide data columns.

See also Operation, Report Preview


Printers
The Printers window lets you easily perform all printer related tasks.

Toolbar Buttons
 Data Grid Contents
 Data Cell Actions
 Drag and Drop
 Popup Menus
Toolbar Buttons
Button | Name | Description
 | Outline view | Outline view mode allows grouping of the data by any criteria.
 | Form change | Starts the Form Change dialog for the current printer.
 | Enable | Activates the current printer.
 | Disable | Stops the current printer and/or puts it into hold state.
 | Route printer | Routes the output of current printer to another device.
 | Reset routing | Resets routing of the current printer.
 | Help | Starts Help at the Printers section.
 | Close | Closes the current window.
Data Grid Contents

Title | Cell Contents
No. | Printer identification. A red number indicates, that at current time no access permission exists for this printer.
Name | Printer description.
Frm | The form currently mounted on the printer. Reports can only be printed, if a printer has the correct paper inserted and a Form Change has been carried out.
Status | Printer state such as ready, active, on hold, etc.
Report | On active printers, this cell shows the description of the current print job.
Page/of | Currently printing page / total no. of pages.
Copy/of | Currently printing copy / total no. of copies.
ID | ID of the user that created the currently printing report.
Data Cell Actions
To initiate an action, double click in the following grid cells:
Data Field | Action
Frm | Starts the Form Change dialog.
Status | Depending on printer state, the corresponding dialog (Start Printer, Stop Printer) is started.
Drag and Drop

Drag Object | Drop Object | Action
Form | Printer | Starts the Form Change dialog.
Printer | Report | Depending on printer and report state, the corresponding dialog (Start Printer, Release Report, Route Report, Form Change) is started.
Report | Printer | As above.
Popup Menus
Clicking the right mouse button in specific areas, opens a popup menu depending on context:
Area | Menu
Toolbar | Menu and toolbar on/off toggles.
Grid Row | Opens a menu with selections equivalent to the toolbar.
Column Headers | Show or hide data columns.

See also Forms, Operation, Report Queue


Forms
The Forms window lets you easily mount a form to a printer with drag and drop.

Toolbar Buttons
 Data Grid Contents
 Drag and Drop
 Popup Menus

Toolbar Buttons
Button | Name | Description
 | Help | Starts Help at the Forms section.
 | Close | Closes the current window.
Data Grid Contents

Title | Cell Contents
ID | Form identifier
Name | Form name
Drag and Drop

Drag Object | Drop Object | Action
Form | Printer | Starts the Form Change dialog.
Report | Printer | As above.
Popup Menus
Clicking the right mouse button in specific areas, opens a popup menu depending on context:
Area | Menu
Toolbar | Menu and toolbar on/off toggles.
Column Headers | Show or hide data columns.

See also Operation, Printers, Report Queue


Report View
The Report View window lets you inspect reports before they are printed.

Toolbar Buttons
 Popup Menus
Toolbar Buttons
Button | Name | Description
 | First page | Show first page of report.
 | Page backwards | Show previous page.
 | Page forward | Show next page.
 | Last page | Show last page of report.
 | Go to page... | Go to page.
 | Search backwards | Search again backwards.
 | Search | Text search.
 | Repeat search | Search again forwards.
 | Copy | Copy selected text to the clipboard.
 | Increase font | Increase font size.
 | Decrease font | Decrease font size.
 | Compress | Compress consecutive empty lines into one blank line.
 | Help | Starts Help at the Report View section.
 | Close | Closes the current window.
Popup Menus
Clicking the right mouse button in specific areas, opens a popup menu depending on context:
Area | Menu
Toolbar | Menu and toolbar on/off toggles.
View | Opens a menu with selections equivalent to the toolbar.

See also Operation, Report Queue


Operation
Operation of WinCss follows the well known standard of most Windows programs. One exception is in the method of sorting of data tables.

As a reminder, the following sections list the most common actions:

Popup Menus
Sorting
Selection
Popup Menus
Popup menus are activated by a right mouse click. The content of such menus is depending on context, i.e. the area, in which the mouse pointer is positioned.
Sorting
In contrast to other Windows programs (e.g. the Explorer), WinCss allows to sort data tables by multiple columns. A left mouse click in the column header area changes the sort setting. Three different states are available:
Symbol | Sort Setting
 | No special sort.
 | Ascending sort, i.e. the lowest value first, the highest value last.
 | Descending sort, i.e. the highest value first, the lowest value last.

In multicolumn sorts, column priority is from left (highest) to right (lowest). You may change the priority by rearranging the columns with click and drag.

Hint: All sort settings may be reset through the popup menu invoked with a right mouse click on the column header area.

Selection of multiple elements
Selection of multiple data rows is done with the left mouse button:
Method | Selection
Drag | Dragging with the mouse button pressed selects multiple consecutive data rows.
Shift | Holding down the Shift key while clicking the left mouse button, selects all data rows between the current position of the mouse pointer and the click position.
Ctrl | Holding down the Ctrl key while clicking the left mouse button, adds the clicked row to the selection. A second click removes the row from the selection.

Hint: The popup menu invoked with a right mouse click on an outline node, lets you select all elements of the node.


WinCss Options - General
The General tab of the Options window lets you customize general features of WinCss.

General Options
General Options
Option | Description
Startup with Mini Toolbar window | If this option is set, WinCss will startup with the Mini Toolbar window (see Main Control).
Single Click Actions | Checking this option causes data field actions to be started at a single mouse button click instead of the default double click.
Show field buttons | Checking this option causes a small button to be displayed in each data field that has an action associated to it.
Mouse Snap | Checking this option causes the mouse pointer to jump to the default button whenever a form opens.
Confirm Delete | Unchecking this option will cause immediate report deletion, without the normal confirmation dialog window. Use at your own risk.

See also Color Options, Connection Options


WinCss Options - Colors
The Colors tab of the Options window lets you customize the grid colors of WinCss.

Color Options
Color Options
Option | Description
Startup with Mini Toolbar window | If this option is set, WinCss will startup with the Mini Toolbar window (see Main Control).
Single Click Actions | Checking this option causes data field actions to be started at a single mouse button click instead of the default double click.
Show field buttons | Checking this option causes a small button to be displayed in each data field that has an action associated to it.
Mouse Snap | Checking this option causes the mouse pointer to jump to the default button whenever a form opens.
Confirm Delete | Unchecking this option will cause immediate report deletion, without the normal confirmation dialog window. Use at your own risk.

See also General Options, Connection Options


WinCss Options - Connection
The Connection tab of the Options window lets you customize connection related settings of WinCss.

Connection Options
Connection Options
Option | Description
IP Address | The IP address of the CSS server system.
Port Number | The TCP/IP port providing the CSS interface services. For a description of IP addresses and ports see the next section.
Select Host at Startup | Checking this option will let the user to select the CSS server IP address at WinCss startup time.
Convert login name for CSS server to lowercase | This option may be set to avoid letter case conflicts between Windows and Unix login names.

Please note, that these settings are stored in the Windows registry when the program terminates and will take effect when you run WinCss the next time.

See also General Options, Color Options, Client Configuration


WinCss Client Configuration

The installation process of WinCss follows the common Windows standards. The first time the new program is started, it will prompt for the IP address of the CSS print server and the TCP/IP port number with the default value of 6801. If this port number is already used in your network, the network administrator has to assign another number which has to be entered here. Additional manual configurations have to be done in this very unlike situation.

TCP/IP Ports and Services
 Additional CSS Client Configuration
 Running WinCss / Troubleshooting
TCP/IP Ports and Services

To establish a TCP/IP Client-Server connection, the client (WinCss) must know the IP address of the system providing the server functionality. In addition, each connection type (e.g. cssws to WinCss) is identified through a unique port number. The TCP/IP services file defines symbolic names for most of the ports used in a network environment. Using these symbolic service names requires the services file to be present on each network nodes, i.e. on the host and on all client systems. On Unix systems, the file is located in the /etc directory. On Windows systems the location varies depending on OS type and version. Each line in the services file holds the service name, a port number and a port type (for CSS the type should always be tcp). To avoid conflicts with standard TCP/IP ports, these numbers should have values > 5000 assigned by convention. Unitec products use port numbers in the range from 6800 to 6999.

Since in heterogeneous environments the administration of the services files requires considerable work, there has recently emerged the trend to define so called well known ports for each connection type. For the WinCss connection the port 6801 has been defined as the default. To avoid conflicts with other software packages another port number may be assigned during setup of WinCss. This value is then stored string variable CssPort located in the Windows registry under

HKEY_LOCAL_MACHINE\SOFTWARE\Unitec\WinCss\CurrentVersion

For all CSS servers (Unix and Windows NT) the port number is defined in the WINCSS_PORT parameter of the configuration file css.default.

In addition, the programs cssws and WinCss allow to specify TCP/IP configuration settings as command line arguments. Example:

cssws -p 7001 | the Unix WinCss server should use port number 7001 to provide its services
WinCss -h 128.41.1.1 -p 7001 | the WinCss client connects itself with the CSS server located on the host with the IP address 128.41.1.1 using the port number 7001

For server configuration refer to the Unix and Windows/NT Server Configuration topics and the CSS online manual.
Additional CSS Client Configuration

The WinCss program is designed to operate in two different modes. In standard operation, the tool buttons of the small toolbar window are added to the Report Queue window which then acts as the main window. You may however choose to use the small toolbar window as main window. The command line flag -m or /m can be used to turn tool window mode on. This flag can be preset after each installation in the properties of the WinCss.exe icon in the WinCss program folder.

In addition, the -h or /h option may be used to specify the IP address of the server and -p or /p to use a specific port number. This feature makes it possible to connect to several different CSS servers concurrently.
Running WinCss / Troubleshooting

Make sure that you have followed the steps described above and that the setup.exe program has completed without any errors. You are now ready to start WinCss. If the program fails to start or an error message is shown, please double check your TCP/IP system files. After you have done the necessary corrections, you will have to shut down the Unitec Communication Manager Ucm.exe. This process has been started automatically and is running invisible on your system. To stop it, type Ctrl-Alt-U and you will see its icon on the Windows task bar. Click the right mouse button on the icon and select Close in the pop up menu. If a warning window is shown, select the Close button and ignore the warning. You may now retry to run WinCss.

The utility CssVerCk.exe may be used to resolve version conflicts with installed Windows components.

See also Connection Options, General Options


Unix CSS Server Configuration

WinCss Unitec Home Page

Unix Server Configuration

The installation process of Unix CSS requires some system administrator knowledge. The following sections may give you some useful information.

TCP/IP Ports and Services
 Running the Server Process
TCP/IP Ports and Services

For all CSS servers (Unix and Windows NT) the default WinCss TCP/IP port number 6801 may be redefined in the WINCSS_PORT parameter of the configuration file css.default.

In addition, the programs cssws(U) and WinCss allow to specify TCP/IP configuration settings as command line arguments.
Running the Server Process

As with any server process, the program /usr/lib/css/cssws has to be spawned at system startup. Several system services (e.g. /etc/rc(4) or /etc/inittab(4)) allow to configure automatic server invocation.

/etc/rc:

/usr/lib/css/cssws 2>/dev/null 1>&2

Unix System V only:

The same service can be established on System V by inserting the following line in /etc/inittab(4):

cssws:1:respawn:/usr/lib/css/cssws 2>/dev/null 1>&2

Internet Super Server (inetd):

Since the Internet Super Server inetd(1) requires to use symbolic service names, you must first edit your /etc/services file and add the line:

cssws 6801/tcp # WinCss server

Then edit your /etc/inetd.conf file and add the lines:

# CSS Service
cssws stream tcp nowait root /usr/lib/css/cssws -i

The inetd(1) process reads configuration file /etc/inetd.conf at startup to initialize itself. This will make the cssws services available for connections through WinCss.exe on the Windows client.

Unless started by the init(1) program, cssws(U) will detach automatically from the calling process.

Note:

The WinCss software needs to be registered and serialized with the Unitec License Manager ulm(I) program.

See also Client Configuration, Connection Options


Windows/NT CSS Server Configuration

The WinCss services are provided from the program CssNTSrv. This program is installed as NT service by Setup and will be started automatically at system startup.

For all CSS servers (Unix and Windows NT) the default WinCss TCP/IP port number 6801 may be redefined in the WINCSS_PORT parameter of the configuration file css.default.

In addition, the programs cssws(U) and WinCss allow to specify TCP/IP configuration settings as command line arguments.

Note:

The WinCss software needs to be registered and serialized with the Unitec License Manager ulm(I) program.

See also Client Configuration, Connection Options


About Us

WinCss Unitec Home Page

X
X

About Unitec

Unitec Informatik is a small Swiss software company specialized in Unix and Windows system tools and consulting. Unitec was founded in 1980.

Our major products include CSS a Commercial Spooling System for Unix or Windows/NT and UCM the Unitec Communication Manager for Client-Server communication in heterogeneous network environments.

We are proud to be rated the #1 source for print management software and communication technology by our customers.

Unitec software is known to have excellent quality. Our support line hardly ever rings, and we want to keep it that way.


Technical Support

This help file and the online manual represent our best effort to provide complete and accurate information about the WinCss software.

If you have a question, please begin by consulting the on-line reference material.

If your question cannot be answered, you can contact tech support by E-mail at support@unitec.ch. Since we are not organized to provide continuous voice support, E-mail is by far your best option to get fast help for your problem.


How to Reach Unitec

Postal address: | Unitec Informatik Leerueti 797 CH-8625 Gossau, Switzerland
Phone: | +41 1 935 4064
Fax: | +41 1 935 4466
Home Page: | http://www.unitec.ch
E-Mail: | info@unitec.ch
Sales: | sales@unitec.ch
Support: | support@unitec.ch

For information about international representatives, please visit our Web site.


Unitec Products

CSS Commercial Spooling System

Our highly accepted Unix and Windows/NT spooler, especially designed for commercial applications, is used by more than 25000 users around the globe.

WinCss

The graphical user interface for Unix CSS and CssNT.

UCM Unitec Communication Manager

The easiest and most sophisticated way to implement client-server applications in heterogeneous network environments or to manage local inter process communication.

To get the latest information about all Unitec state of the art products, please visit our Web site at www.unitec.ch.


CSS Online Manual

The CSS online manual referenced throughout this help system is not contained in all distribution packages.

You can however browse it online in the support area or get a local copy from the download area of our Web site at www.unitec.ch. Several different formats are available.


Configuration

Chapter 4 - Configuration
4.1. Overview

This chapter describes the configuration of the CSS operational environment:

  • System wide parameters are set in the file /etc/css.default.
  • Multiple files are affected for the Virtual CSS Server configuration.
  • Virtual CSS server parameters are set in the file $CSS_ENV/etc/css.default.
  • All devices, their capabilities and control sequences that are served by the spooling system are defined in /etc/css.devices.
  • The forms used and their dimensions are defined in /etc/css.forms.
  • License manager parameters are set in the file /etc/ulm.default.
  • Multiple files are affected for the WinCss configuration.

Important!

Printer- and form definitions are active only after successful compilation by the program csa(U).


Css.Default

CSS Environment

css.default(C)
Name Platforms Description Parameters Notes

Name

/etc/css.default

Platforms

Unix, Windows NT

Description

Css.default contains the definitions of system-wide CSS parameters. When operating virtual CSS print servers, each of these servers has an additional default file in its home path identified by the CSS_ENV environment variable. Each command searches for this file whenever it has been invoked. The file contains one or more entries that define the default information. Each entry has the form:

keyword=Value

where keyword identifies the type of information available and value defines its value. Both keyword and value must consist of letters, digits and punctuation. The exact spelling of a keyword and the appropriate value are described in the following table.

Any line starting with a number sign (#) is considered a comment and is ignored.

In contrast to parameter values, parameter names (keywords) are case insensitive.

Parameters

In the current CSS version, the following configuration parameters are available:

Name

Description Default Value
AUTO_REORG Automatic reorganization of the report queue upon the first call of the css(U) program per day (removal of reports whose keep date has expired):
no: | no reorganization
all: | all reports with keep date expired
printed: | all reports with keep date expired and that have been fully printed

See also csa(U), k- and K-options.

no
BANNER_MARGIN | Normally banners print from the first to the last line of the page. On misadjusted forms, this may cause report pages to have banner lines printed on. To avoid this effect, the BANNER_MARGIN parmeter may be used to set the top and bottom margins of banner pages. | 0
BINARY_VIEW | Enable / disable the view of binary type reports in the css(U) dialog: true or false. We recommend to disable this option for end-users. | false
CSS_BASE_DIR Base directory containing all CSS control files, the license validation file and the print daemon lpd. The path name may be specified during setup. /usr/lib/css

CssNT:

lib
CSS_SPOOL_DIR Directory where CSS will store report requests. The path name may be specified during setup. /usr/spool/css

CssNT:

spool
CSS_VERSION | Installed CSS System version. This entry is generated by the setup(I) process and should never be changed.
DATE_TYPE Date format to bu used in the css(U) dialog screens:

AM, US: | MM/DD/YY
EU: | DD.MM.YY
IN: | YY/MM/DD
 EU
DEFAULT_FORM | Defines the default form, if the f-option of lpr(U) is not specified. | A
DEFUALT_DEVICE | Defines the default device, if the d-option of lpr(U) is not specified. | 0
DEV_STOP_TIMEOUT | This parameter controls the behavior of the lpd despooler program on stop request for active printouts. If it is set to a value other than zero, the despooler process will stop after the defined number of seconds are elapsed, even if the current page has not been spooled completely. The device and the current report are set to the 'hold' state. Please note, that even if DEV_STOP_TIMEOUT has been set, it might be possible, that the process is unable to terminate. Many Unix systems do not allow a process to stop if it is performing an output operation that the OS has not yet been able to complete (typically if a printer is turned off). As soon as the printer is switched on again, this feature should behave as expected. In order to give CSS a chance to stop after the current page has been processed, this parameter should be set to a reasonable value (e.g. 90). The default value is 0 (zero, no timeout processing). | 0
ERRLOG_SIZE | This parameter sets the size of the CSS lpd error log file css.errlog in KB. Once the file reaches the defined size, it is reset and any previously recorded information is lost. | 4
EXT_LOCK Locking method to be used for the processing of the el-parameter in css.devices:
lock: | The lock file is locked through internal Unix locking and will be automatically removed by the kernel, even if the lpd daemon does not terminate in a graceful way. The file will be created automatically and remains in the file system after the unlock operation. This is the safest el locking method.
sema: | The lock file acts as a file semaphore. It is automatically created during the lock operation and removed to signal the end of the lock. This method is intended to synchronize printer sharing with other software packages. Since the (unrecommended) use of kill -9 or other abnormal program termination may lead to zombie lock files, this method should be used as a last resort only.
 lock
JOB_FLAGS | This parameter may be set to true to mimic prerelease 3.4 condition flag behavior. For details refer to the migration notes in Chapter 1. | false
LANGENV | This parameter may specify an environment variable name to be inspected for css(U) dialog language information. If set, the variable takes precedence over the LANGUAGE parameter but may be overwritten by L-option of css(U).
LANGUAGE | Language to be used in the css(U) dialog screens:dutch, english, french oder german | english
PROTECTION Protection to be applied in the report queue maintenance:
user: | user ID
group: | group ID
none: | no protection
 user
PUBLIC_GROUP | Reports owned by any group specified in this parameter will be accessible by all users, despite the setting of the PROTECTION parameter. By default a new report will be owned by the creating user and the group associated with that user. Ownership may also be controlled by the lpr(U) u- and g-options. This parameter may define one or more groups (name or numeric ID), delimited by the pipe symbol ‘|‘ or by comma ‘,’.
PUBLIC_USER | Reports owned by any user specified in this parameter will be accessible by all users, despite the setting of the PROTECTION parameter. This parameter may define one or more users (name or numeric ID), delimited by the pipe symbol ‘|‘ or by comma ‘,’.
SHOW_CSSFLAGS | Causes to show the d-, u- and x-option flags in appropriate screen headers of the css(U) dialog, when set to true. | false
TEST_PRINT | Enable / disable the test-print feature after form changes through css(U):true or false | true
TEST_PRINT_ACHAR | Substitution character of alphabetic characters during test-print through css(U). | X
TEST_PRINT_NCHAR | Substitution character of numeric characters during test-print through css(U). | 9
VIEW_CONTROL_CHAR Defines the substitution character of nonprintable values in the report view screen of css(U). Control characters are from 0x00 through 0x19, 0x7f and 0xff, except CR, LF, BS and TAB. The following values are possible:
space: | use 0x20, space
null: | do not show
x: | use character x
VIEW_DEVICE | Defines the device definition to use to display a report in the css(U) report preview screen.
WINDOWS_SERVER | Defines the service name of the Windows server cssws(U)). The same name must be present in the /etc/services file. | cssws
WINCSS_PORT | Defines the TCP/IP port number to be used by the Windows server cssws(U) or the NT service process CssNTSrv(U). | 6801
WINCSS_VIEW_DEVICE | Defines the device definition to use to display a report in the WinCss(U) report preview screen. | setting in VIEW_DEVICE
WRAP_SCREEN | Enable / disable the navigation default in the css(U) dialog to wrap screens from last to first. | false

The next table describes system dependent parameters that are used in special environments only:

Name | Description | Default Value
INT_LOCK Internal locking method to be used for all CSS databases. This parameter was introduced due to an error in the lockd(1) daemon of Ultrix Rel. 4.30. If e.g. the command csu -i 1 hangs, try to set int_lock to the value sema. We strongly recommend however to use the lockd program of Rel. 4.2a or 4.3a, which both work fine:
lock: The normal locking method.
sema: Causes CSS to use file semaphores for its internal locking. Please note, that if ever you have to stop a CSS process, it should be killed with signal 15 (i.e. use kill or kill -15). If for any reason you have to use kill -9, you must check the CSS spool directory (normally /usr/spool/css) and remove the following files:
lck..dev | (devices)
lck..form | (forms)
lck..rep | (reports)

You may also use
rm -f /usr/spool/css/lck..* in your system startup procedure.

lock
LOCAL_TIME Enable / disable the timezone and seasonal time adjustment through the localtime(3) library function for all report time and date information:
true or false. The false value may fix incorrect time information caused by nonstandard use of the TZ environment or by kernels generated with a nonlocal time zone. 		true
Some users reported problems with printers connected to printer- or terminal-servers. To avoid these problems, the rigid IO checks of the CSS despooler daemon lpd have been relaxed starting with Rel. 3.08f. They can however be enabled by setting some or all of the parameter values to true. To see the error messages of failed system calls, consult the file css.errlog, located in the CSS base directory (normally /usr/lib/css).
LPD_CLOSE_CHECK | Check the close(2) system call status, true or false | False
LPD_CLOSE_DLAY | Wait n seconds before calling close(2). | 0
LPD_DV_MULTY_OPEN | Do perform an open(2) / close(2) combination for each report, true or false. No effect for output pipes. | false
LPD_FLUSH_CHECK | Check the fflush(3) system call status, true or false | false
LPD_FLUSH_DELAY | Wait n seconds before calling fflush(3). | 0
LPD_OP_CLOSE_CHECK | Check the pclose(3) system call status for output pipes, true or false | false
LPD_SIGPIPE_CHECK | Check the broken pipe signal sigpipe, true or false | false
LPD_WRITE_CHECK | Check the write(2) system call status, true or false | false

Notes

Except the TIME entry, CssNT ignores all system dependent parameters.

If /etc/css.default is missing, CSS will run with the default configuration.

Important!

If the directory entries (x_dir) do not correspond to the current configuration, CSS will not be able to run correctly.


Css.Devices

Device Definition Data Base

css.devices(C)
Name Platforms Description Capabilities Types Basic Capabilities Formfeed / Linefeed Character Translation Escape Translation Remote Printing Notes Files See also

Name

css.devices

Platforms

Unix, Windows NT

Description

The file css.devices is a data base describing the CSS devices (printers). This data base is used by all CSS programs and utilities. The printers are defined by giving a set of capabilities and by describing how operations are performed. Initialization and termination sequences are included in css.devices.

Entries in css.devices consist of a number of fields separated by colons ':' (similar to termcap(5)). The first entry for each printer gives the logical CSS device number (1..999) and separated by a vertical bar '|' the device name. The name may include spaces for readability but should not exceed 20 characters. Only the last entry of multiple definitions with the same device number will become active. By assigning a device number 0 (zero), an entry becomes inactive and will be skipped by the compile process through csa(U).

In contrast to termcap(5) the definitions in css.devices do not serve as a reference for the CSS programs. Rather they have to be compiled with the aid of the csa(U) administrator utility into an internal, very efficient format. Thus any changes to css.devices become active only after a successful compilation.

Capabilities

Name | Type | Description | Default
as | bool | automatic printer selection | false
bm | bool | binary mode | false
bol | str | begin of line control sequence
bop | str | begin of page control sequence
bor | str | begin of report control sequence
bp | bool | banner page | false
cr | bool | LF » CR/LF conversion | false
dn | str | device name, may be used place of the logical device number as alternative identification
dt | str | printer type, controls routing of binary reports
dv | str | Unix device file for output
el | str | Unix lock file for external locks
eol | str | end of line control sequence
eop | str | end of page control sequence
eor | str | end of report control sequence
es | bool | elongate by spaces, elongated printing (e9, e10) is achieved by inserting space characters | false
et | bool | expand tab characters to standard positions. Useful for ports, that do not support stty(1) settings (e.g. parallel ports).
e1..e127 | str | escape translation
fp | num | formfeed padding (depreciated) | 0
if1 | str | printer initialization file 1
if2 | str | printer initialization file 2
lp | num | linefeed padding (depreciated) | 0
map | str | combine several forms into a form class
mp | num | Max. pages. Reduces output to num pages per report. If the limit is reached, the report will be set to the hold status.
op | str | output through pipe
pg | bool | page printer flag | false
ps | num | preset page size | 0
rpm str remote print mode:
Mode | Protocol
lpd | standard BSD lpd
rlpd | relaxed lpd
rtel | reverse telnet
pros | Axis Pros
raw | TCP/IP direct port addressing

For a detailed description, see the Remote Printing section below.

rph | str | remote print host name or IP address
rpp str remote print port number or service name
Mode | Default
lpd | 515
rlpd | 515
rtel | 2000
pros | 35
raw | none
rpq | str | remote print queue name. In some printer box manuals, this value is also referred to by 'remote port', 'remote service name' or 'remote printer name'.
rpr | str | remote port
rpw str remote password
Mode | Default
pros | netprinter
tf1 | str | printer termination file 1
tf2 | str | printer termination file 2
tr | str=str | character translation
vd | bool | view device | false
wfc | str | write fail command
wft | num | write fail timeout in seconds | 3600
xmap | str | combine all forms except the group specified into a form class (exclusive map)
# str comment

The following entry describes some of the capabilities of a Brother HL-8 running in LaserJet II mode:

1|HL-8 (LaserJet Mode):dn=HL8:as:pg:cr:\
:dv=/dev/tty04:dt=HPGL:map=a,a4h,a4q:\
:bor=\EE\E&l0O\E&l68P\E&l66F\E&l2E\E*t300R:\
:bor <A4L>=\E&l1O\E&l48P\E&l46F:\
:eor=\EE:\
:e1=\E&k0S:#10 cpi:e2=\E&k4S:#12 cpi:\
:e3=\E&k2S:#16.5 cpi:e4=\E&k2S:#16.5 cpi:\
:e11=\E(s1S:e12=\E(s0S:#italic on/off:\
:e15=\E&a-0.5R:\e16=\E=:#superscript on/off:\
:e17=\E=:e18=\E&a-0.5R:#subscript on/off:

Definitions may span to multiple lines by giving a backslash '\' as the last character of a line. Empty fields can be included for readability and are most often used between the last field on a line and the first field on the next. Capabilities in css.devices are of three types: Boolean capabilities, which indicate that the printer has some particular feature or that a certain mode of operation shall be applied, numeric capabilities giving the size or count of something, and string capabilities, which give a sequence that can be used to perform particular printer operations or define a file name to be downloaded to the device.

Device definitions may contain an include statement:

1|Printer 1:include=file:

Include files may however not span device definitions, i.e. they may only contain capabilities of the devices they have been entered for. Multiple as well as nested include statements are allowed. The include file may be specified absolute (name starting with a slash ‘/’) or relative. Relative files are searched for in $base_dir/include (normally /usr/lib/css/include). Within include files the line continuation indicator ‘\’ may be omitted.

Types

Each capabilitiy has a two or more letter code. For instance, the fact that a printer shall be 'automatically selected', even if no device had been entered in the lpr(U) command line (i.e. it is a so called system printer), is indicated by the capability as. Numeric capabilities are followed by the character '=' and then their decimal value.

\E | Escape character
^x | Control-X (x = any character)
\n | Linefeed
\r | Carriage Return
\t | Horizontal Tab
\a | Audible Alarm
\b | Backspace
\f | Formfeed
\v | Vertical Tab

Any character can be given as three octal digits after a \ or as two hexadecimal digits after \x. Preceding a character by the tilde '~' will set its high order bit (0x80). Combinations such as '~^x' and '~\E' are supported. If it is necessary to place a CSS meta character '=', ':', '^', '~", '/' and '\' in a capability, it must be escaped by a \ (\=, \%, \:, \^, \~, \/ and \\) or encoded in the above octal or hexadecimal form.

Basic Capabilities

The dv capability serves to establish a connection between a CSS device and a Unix device. If the string starts with a slash '/', the value is taken as an Unix device file name and used as is. All other values are combined with the leading string '/dev/lp' (e.g. dv=02 will expand to '/dev/lp 02'). If no dv entry is present, the name is constructed using '/dev/lp' and the logical device number (e.g. printer no. 5 is attached to /dev/lp5). As an exception to this rule, printer no. 1 attaches to just /dev/lp. To set the terminal I/O modes (such as baud rate, parity, number of stop bits, type of handshaking and all other line attributes) the setmode(U) utility should be used.

Under CssNT the dv entry is mandatory, no default is assumed. Devices are defined in the Universal Naming Convention (UNC):

dv=//host-name/printer-share-name

Please note, that within css.devices all file names must be entered using the Unix directory separator '/'. The colon ':' after the drive letter, must be preceded by the backslash '\' (BS). Failing to do so would cause CSS to assume the end of the parameter entry:

C\:/dev/printer1

You may also enter a disk file as target device. This feature is often used to verify the output generated of device definition. The contents of this file is overwritten by each printout. E.g.the printer defined by the CssNT Setup program has the entry

dv=C\:/CssDev1.txt

Therefor, output will be directed to the disk file C:\CssDev1.txt.

All CSS programs do accept a symbolic name in place of the logical device number. The symbolic device name may be defined by the dn capability. The string is case insensitive and should not exceed 16 characters. Embedded spaces are not allowed.

The dt capability (device type) serves to group printers by type. CSS allows report routing of binary reports only to devices of the same type. Therefor the same type should be assigned only to devices with identical control language (e.g. HPGL5, PostScript). The string is case sensitive and should not exceed 14 characters.

Whenever CSS has to share a printer within distinct virtual environments or with another software package (such as alternate spoolers or office automation software with integrated spooler), a lock file name, indicating the current use of a device may be defined by the el-parameter. Any printer with such an entry will only be used, if the corresponding lock file will mark the device as currently no in use. The locking method may be chosen through the ext_lock parameter in css.default. If the printer is available, CSS signals its use by creating the file or putting an advisory lock onto the file according to the lock method chosen. The name of the lock file must be specified in absolute format (i.e. must start with the slash '/' character (e.g. /usr/spool/lock/lck..lp2). Names beginning with '/usr/spool/css/LCK..' may not be used.

The access path of the lock files must exist and be accessible by all users (see mkdir(1) and chmod(1)). When used in combination with the EXT_LOCK=sema parameter of css.default, it is the responsibility of the system administrator to assure that no unused lock files exist in order to provide undisturbed operation. Notably kill(1) commands with the -9 option should be avoided, since they disallow the killed process to cleanup its environment and to terminate in a decent way. To achieve a correct state after a powerfail, existing lock files may be removed by appropriate rm(1) commands in the file /etc/rc. In any case EXT_LOCK=lock (the default) should be favored, since it provides clean and safe locking without the danger of zombie file semaphores.

The el capability may also be used to 'cheat' CSS by assigning more than one logical device to a single physical device.

The as boolean capability is used to enable an automatic printer selection for reports that have been created without specifying a target device by the d- or r-option of the lpr(U) command. Whenever such a report is spooled, CSS will scan the as devices and - provided that the requested form is mounted - choose it for output. The as parameter should not be used for printer that have to be selected explicitly (typical for daisy wheel and off-site printers). All devices having as set are referred to as main- or system-printers.

The fact, that a particular model is not able to print in elongated mode (CSS control sequences e9 and e10), is stated by the es capability (elongate by spaces). To avoid misalignment CSS will elongate by spaces, i.e. emulate the elongate attribute by inserting a space after each character on such printers.

The et capability (expand tabs) causes tab characters to be expanded to the standard positions (9, 17, ...). This is especially useful for ports that do not support stty(1) settings.

Since device descriptions of laser printers often include form definitions such as orientation, number of lines per page and margins are often defined by the use of (form-) conditional bor entries, different logical forms (see css.forms) may be printed on the same physical paper type without the need of a form change (automatic form change). Such form groups may be defined by the use of the map capability. For instance, the entry map=a,b,e,f combines the forms A, B, E and F into one group and will allow printouts onto one form of the group, if any other form of the same group is mounted as the current form of the target device. To calculate the page- and line-length however, the definitions of the requested form will be used. Multiple map entries may be defined per device.

The xmap capability (exclusive map) allows to combine all forms except the ones defined in the xmap definition. Map entries are still allowed, but are restricted to subgroups of the xmap forms.

Printing of one or more banner pages is controlled by the bp capability. However, banner pages are generated only, if the form used includes the corresponding entry with the same name.
CSS provides the feature to merge strings (text and control sequences) into the print file. The anchors available are:
bor | at the beginning or each report
bop | at the beginning or each page
bol | at the beginning or each line
eor | at the end or each report
eop | at the end or each page
eol | at the end or each line

The syntax of the bo x and eo x capabilities is:

name [<form>][/flag...][%var.eq.val...][{copy}][[page]][(line)][-option...]=value

Multiple entries (up to a system imposed limit) of the above capabilities are allowed. Output occurs strictly in the order of the definitions. By stating conditions, the selection of the statement may be restricted.

The conditions available are:

Condition | The definition is valid if...
<form> | ...the printout is assigned to form
/flag ...the flag condition is TRUE. Condition flags may be set through the C-option of the lpr(U) call or dynamically during the printout. The flags may be combined by logical operators:

/&flags

logical and (default): all flags defined must be set
/|flags | logical or: at least one of the flags must be set
/!flags | logical not: none of the flags may be set
/(expr) flag expressions may be defined by combining flag names and the operators ‘!’ (unary not), ‘&’ (and) and ‘|’ (or). Operator precedence is ‘!’, ‘&’, ‘|’ in decreasing order. Parenthesis may be used to overwrite the default precedence order. Examples:
/(a & b) | same as /ab or /&ab
/(a | b) | same as /|ab
/(!a & !b) | same as /!ab
/(! (a | b)) | dito.
/(a | b & c) | is /(a | (b & c))
%V.eq.val
%V.ne.val 		...the current content of ordering variable %V is equal or unequal (operator .ne.) to val (see below for a list of all available variables). Val must immediately follow the comparison operator. If val contains embedded spaces it may be enclosed by quotes or double quotes, which in turn can be escaped as \' or \" to be considered as part of val. With the i-option comparison may be defined as non case sensitive. Examples:

New years day of a new decade:

%'d'd.eq.1 %'m'd.eq.1 %[1]'yy'd.eq.0 %1'yy'd.ne.0

New years day of a new century:

%'d'd.eq.1 %d'm'.eq.1 %'yy'd.eq.00 %[1]1'yyyy'd.ne.0

New years day of a new millennium:

%'d'd.eq.1 %'m'd.eq.1 %[1]'yyyy'd.eq.000
{copy} ...the current copy is within the range copy. A copy range may be defined as:
9 | absolute copy counted from the beginning of the current print job
-9 | relative copy counted from the end of the print job
9,99 | from-to copy (absolute)
$ | last copy
o | odd copy numbers
e | even copy numbers

Examples:

{e} | all even copies: 2,4,...
{2,$} | from copy 2 (all copies except first)
{o -5,$} | the odd copies of the last six
{1,-1} | all copies except the first and the last one
[page] ...the current page is within the range page. Page ranges follow the same syntax as copy ranges:
9 | absolute page counted from the beginning of the report
-9 | relative page counted from the end of the report.
9,99 | from-to page (absolute)
$ | last page
o | odd page numbers
e | even page numbers

Examples:

[e] | all even pages: 2,4,...
[2,$] | from page 2 (all pages except first)
[o -5,$] | the odd pages of the last six
[1,-1] | all pages except the first and the last one
(line) ...the current line is within the range line. Line ranges follow the same syntax as page ranges:
9 | absolute line counted from the beginning of the page
-9 | relative line counted from the end of the page.
9,99 | from-to line (absolute)
$ | last line
o | odd line numbers
e | even line numbers

Examples:

(e) | all even lines: 2,4,...
(2,$) | from lines 2 (all lines except first)
(o -5,$) | the odd lines of the last six
(1,-1) | all lines except the first and the last one

The following table defines the permissible conditions:

 | bor | eor | bop | eop | bol | eol
form | ¤ | ¤ | ¤ | ¤ | ¤ | ¤
flag | ¤ | ¤ | ¤ | ¤ | ¤ | ¤
value | ¤ | ¤ | ¤ | ¤ | ¤ | ¤
copy | ¤ | ¤ | ¤ | ¤ | ¤ | ¤
page |  |  | ¤ | ¤ | ¤ | ¤
line |  |  |  |  | ¤ | ¤

Options:

Options may be used to change the behavior of the CSS despool process. Besides common options, the eol- and eop-parameters allow the definition of special options. To clarify their mode of operation consider the following device definition:

1|Test (Page Printer):pg:\
:eol=<eol>:eop=<eop>:eor=<eor>

The input file

Line1 linefeed
Line2 linefeed formfeed

produces the output

Line1 <eol> linefeed
Line2 <eol> <eop> linefeed formfeed <eor>

eol and eop l-option:

This option suppresses output of linefeeds (hex 0x0A) for all lines that evaluate one or more eol definitions to be active. If an active eop definition has the l-option set, the linefeed character of the last line will be suppressed (which is redundant to eol ($) -l). Of course, linefeeds may still be generated explicitly within the eo x control sequence.

eop f-option:

This option suppresses output of form feeds (hex 0x0C) even if the device has been defined as page printer (pg boolean). The f-option is useful for printers that require special control sequences to end a page (e.g. single sheet feeders). It may also be helpful to develop PostScript definitions.

Suppression of form feeds is active for all pages that evaluate one or more eop definitions with the f-option set, to be active.

Example:

:eop [1,-1] -f=... : # suppress formfeed:\
:eop [$]=...: # except last page:

Common options:

Options without argument may be grouped following a single ‘–’ character. Arguments may immediately follow the option character or may be delimited by a space.

Option | Description
-i | Ignore case in ordering variable value condition.
-p | Pipe option: use the standard output of the command defined by value as capability result. The value definition must start with a slash ‘/’ and may contain options. The named file should have its execution flag set. Note: the p-option is not available in CssNT.
The following options take effect if the capability conditions are met and after output of the value definition is complete. If value requests a file or pipe operation, the options are processed only if the named file or pipe can be located and executed (pipe). To only modify condition flags, empty value strings are allowed.
-c cond | Clear, set condition flag(s) cond to false.
-s cond | Set condition flag(s) cond to true.
-t cond | Toggle condition flag(s) cond from true to false and from false to true respectively.

Note!

In order to maintain full flexibility, no restrictions apply to the use of the p-option. You should however be aware, that overuse may seriously degrade your systems performance. It would be unsound to define :bol -p=/usr/css/bol.sh: whereas it may make sense to use :bol [$] ($) -g=/usr/css/bol.sh: for the last line of the last page of the document.

Within the control string of the bo x and eo x definitions (output section), so called ordering variables may be embedded. Ordering variables are special character strings that will be substituted by a value at runtime (for more information on ordering variables see the sections below). Whenever the output section of a bo x and eo x definition starts with the slash character '/', the value is considered to be a absolute path name of a Unix file. If the named file exists and is readable (see chmod(1)), its content is downloaded to the printer. These file names too may be constructed by the use of ordering variables (e.g. to group LaserJet macros by form and language).

All bo x- and eo x-capabilities of a device are processed in the order of their definition. If conditions are present, an evaluation cycle takes place prior output. The use of dynamic condition flags allows to define if, elseif, else conditions, which ease the definition of processing variants with a default:

:bor <a4h> -s H=\Ex: # if form = A4H:\
:bor <a4q> -s Q=\Ey: # elseif form = A4Q:\
:bor /!HQ=\Ez: # else all other forms:

For a description of the operational flow of a printout see also fdu(U).

Caution:

Some printer models are designed to process a 'reset device' command immediately upon reception (i.e. out of sequence) and may thus destroy the content of their buffer unintentionally if such a command is sent by an eor definition. Typical actions performed through eor include resetting of attributes and selection of the standard character pitch of 10 cpi.

The following ordering variables are supported by CSS:

%a | Number of first page printed, 1 on full printouts.
%c | Creation date of current report
%d | Current system date (date of the printout)
%f | File name that has been specified on the lpr(U) command line for the current report. If spooling was through pipe, the null string or the value of the format parameter (see below) will be generated.
%h | Report title (lpr t-option)
%i | Total number of copies to print
%k | Current copy number
%l | Number of lines per page as defined in the ps parameter in css.forms or in the lpr P-option respectively
%m | Current line number within current page
%n | Total number of pages within current report
%p | Current page number
%r | Internal CSS report number
%s | Creation time of current report
%t | Current system time (time of the printout)
%z | Number of last page selected, equal to %n on full printouts.
%A | Generates the control sequences requested by the S-option of the lpr(U) call, translated to the target device. S-options pointing to escape definitions with an e- or p-option will be skipped and thus not included in %A. Example: :e40 -e=%A:
%C | Condition flags (lpr C-option) in the order a..zA..Z0..9
%D | Device number (lpr d-option)
%E | Employee-id (lpr e- or u-option or login name, respectively)
%F | Form type (lpr f-option)
%L | LANG(UAGE) environment variable or lpr L-option
%N | Device name as defined in the dn parameter of css.devices (lpr d-option)
%O | lpr O-option
%P | Program name (lpr p-option)
%S | Form subtype (lpr f-option)
%T | Device type (dt parameter of css.devices)
%V | Device file (dv parameter of css.devices)
%Z | Generates the control sequences requested by the T-option of the lpr(U) call, translated to the target device. T-options pointing to escape definitions with an e- or p-option will be skipped and thus not included in %Z. Example: :e41 -e=%Z:

The syntax for ordering variables is:

%[flags][(field)][[offset]][max][.min]['format']name

flags The flags available include '-' (minus) for lowercase, '+' for uppercase conversion, '<' for left justification and '*' to generate 8-bit binary values. Left justification is performed only if the min value defines a result field that is larger in size than the content of the variable name. The flag '*' will cause CSS to convert numeric values into 8-bit binary entities. This is especially useful for the %l variable (number of lines per page) and will e.g. with bor=\EC%*l and ps=66 generate the following output:
0x1b (ESC) 0x43 ('C') 0x42 (66).
field Fields are mostly used with the ordering variable %O (from the lpr O-option). A field defines a colon ':' delimited substring of the option value. The use of a field index (zero origin) reduces the result of the ordering variable to the substring it points to (without field delimiters).
Example:
:op=/usr/css/outpipe -t %(0)O -n %(1)O -x %(2)[1]2O:

The command lpr -O abc:12:defg will generate

/usr/css/outpipe -t abc -n 12 -x ef
offset | The result is reduced by offset leading characters.
max | Maximal size of the result. If the current value of the variable exceeds max characters, the result is truncated at the right.
min | Minimal size of the result. If the current value of the variable is less than min characters, the result is left padded by spaces (0x20) and right aligned. If min or max have been defined with a leading zero '0', it is used as fill character in place of the spaces. By adding the '<' flag a left aligned output may be achieved.
format Format specification for the time and date variables %c, %d, %s and %t:

d, dd | day, d=1..9 single digit, dd=double digit
m, mm | month (date), single- and double digit
yy, yyyy | year, two or four digits
h, hh | hour, one or two digits
m, mm | minutes (time), one or two digits
s, ss | seconds, one or two digits

Example: | 'mm/dd/yy' | US date format
Default: | 'dd.mm.yy' 'hh:mm' | European date format time
name | Name of the ordering variable (D, F, and so on).

For instance, the definition bor=/usr/lib/css/mac/%+1L/%P is converted to /usr/lib/css/mac/G/prog_xy (Assumption: LANG=german). The fdu(U) utility has been designed to generate LaserJet macros. It can however also be used to easily create any type of binary bor- and eor-files by using its data command. Example:

fdu -o /usr/css/if1 <<#eof#
data esc, '[', 12, 'X';
#eof#

It is out of the scope of this manual to fully cover the countless ways the conditional bo x and eo x capabilities can be put to use. In the following section you can find some typical examples:

1. A laser printer with two paper trays is reserved to produce correspondence. The first page of each letter shall be taken from tray one, all other thereafter from tray two:

...
:bop <cor> [1]=\E&l1H: # select tray 1:\
:bop <cor> [2,$]=\E&l4H: # select tray 2:\
...

2. A second double tray printer is loaded with A4 sheets in tray one and A5 sheets in tray two. Printing on both formats in portrait and landscape mode shall be managed without the need of form changes:

...
:map=a4p,a4l,a5p,a5l:\
:bor <a4p>=...: # setup A4P, tray 1:\
:bor <a4l>=...: # setup A4L, tray 1:\
:bor <a5p>=...: # setup A5P, tray 2:\
:bor <a5l>=...: # setup A5L, tray 2:\
...

3. When printing onto the standard form A, setting the condition flag n on the command line (lpr -C n file...) shall add the current page number as header (text Page x of y). To still yield correct page breaks, an additional two lines must be taken into account in the bor setup:

Assumption: Form A ps=64

...
:bor <a>/!s=..: # setup for 64 lines:\
:bor <a>/s=...: # setup for 64 + 2 lines:\
:bop <a>/s=Page %p of %n \r\n\n:
...

4. While printing checks, line 46 shall be printed in OCR font. The companies bank-account number has to be added as a constant (<program data+account-no>):

Mode 1 / the program produces lines of variable size (as in C):

...
:bol <chk>(46)=\Eon: # start OCR font:\
:eol <chk>(46)=+012000576>\Eoff:\
...

Mode 2 / the program produces lines of fixed size (as in Cobol), so that left positioning with backspaces is required:

...
:bol <chk>(46)=\Eon: # start OCR font:\
:eol <chk>(46)=\b\b\b\b\b\b\b\b\b\b:\
:eol <chk>(46)=+012000576>\Eoff:\
...

The if1, if2, tf1 and tf2 capabilities allow the definition of Unix file names (absolute path names). If the files specified exist and are readable (see chmod(1)), their content will be downloaded after bor processing (if1 and if2 file) and before eor processing (if1 and if2 file) respectively. The init- and termination file names may be constructed dynamically at runtime by the use of ordering variables. Since the same features are provided by bor and eor, these parameters may be dropped in a future CSS release. They remain supported for backward compatibility reasons only.

The op capability (output pipe) lets you define a process that is used for output in place of writing to the dv device file. The access path of the program or shell script must be entered as absolute pathname, i.e. must start with the slash '/' character and the named file must have execute permission. Prior to call of the op process an ordering variable evaluation cycle takes place. The CSS despooler subsequently feeds the report into the standard input of the named program. This feature gives the system integrator complete control to accomplish tasks such as opening connections to network nodes, dial a remote system, routing output to other processes, creating accounting information, sending mail to users or post-processing data.

Example:

/etc/css.devices:

:op=/usr/css/lp_filter %V %E '%h' %m %C:\
:dv=/dev/tty05:...

/usr/css/lp_filter:

: /bin/sh
deviceFile=$1
user=$2
title="$3"
pages=$4
cond=$5
# store accounting info
echo "$user $title $pages" >>/usr/css/acct
# write to device and store exit status
cat >$deviceFile
rc=$?
# inform user if the M flag has been set
case "$cond" in
*M*) mail -s CSS -u $user <<!!
Your report '$title' has been printed.
!!
esac
# and return exit status
exit $rc

If the op process returns an exit status other than zero, the report will be set to the 'hold' status and retained in the report queue. The op parameter is not available in CssNT.

The wfc capability (write fail command) can be used to define a command that is executed when writing to the device fails for more than wft (write fail timeout) seconds. The access path of the program or shell script must be entered as absolute pathname, i.e. must start with the slash '/' character and the named file must have execute permission.

Example:

/etc/css.devices:

:wfc=/usr/css/printerFail %V %D %N %d %t %r '%h':\
:dv=/dev/tty05:...

/usr/css/printerFail:

: /bin/sh
deviceFile=$1
deviceNo=$2
deviceName=$3
date=$4
time=$5
reportNo=$6
title="$7"
# store logging info
echo "- $date, $time: $deviceNo $deviceFile" >>/usr/css/failLog
case "$deviceNo" in
1) routeDevice=2
2) routeDevice=1
esac
# route device
csu -o$deviceNo:$routeDevice 2>&1 >>/usr/css/failLog
# inform root
mail -s CSS -u root <<!!
Printout of report $reportNo '$title' has failed.
Device $deviceNo routed to device $routeDevice.
!!

The vd boolean capability is used to identify device definitions dedicated for the report preview of css(U) and WinCss(U). Devices having vd set, are invisible to all CSS utilities, they can however be assigned to the VIEW_DEVICE and WINCSS_VIEW_DEVICE parameters in css.default. A common use of view devices is to nullify hard coded control sequences with tr definitions for undisturbed display. As an example, suppose we have an application written which generates print output for a specific printer model and we do not have the time to rewrite the programs to suite the hypothetical CSS printer. The obvious solution to achieve device independence, is to use tr definitions to replace the e1..e127 capabilities:

# print reports written for my-printer-model on brand x model y
1|Brand X / Model Y:dn=pr1:dv=/dev/lp:\
:tr=\EI1=\E(s1S: # italic on, use instead of e11=... :\
:tr=\EI0=\E(s0S: # italic off, use instead of e12=... :\
...

To set italic printing on, our device dependent program writes 'ESC I 1' (0x1b4931). The above definition causes CSS to translate this control sequence to 'ESC ( s 1 S' (the HP code to turn italic printing on) during output. The program has migrated to be device independent without changing one line of code. But one problem remains to be solved: the report preview feature of css(U) and WinCss(U) use a very simple device model for display preparation. In fact it has no capabilities defined at all, causing each 2 byte escape sequences of the CSS hypothetical printer to be silently ignored. This device definition is not well suited to process output of our example application and the report preview will contain odd characters resulting from escape codes. What we need is a device that nullifies all control sequences:

# view device for reports written for my-printer-model
901|View Device:vd:\
:tr=\EI1=: # italic on :\
:tr=\EI0=: # italic off :\
...

Using the above device, 'ESC I 1' and 'ESC I 0' will be replaced by nothing (the null string) when sent to the display. To connect a view device to the css(U) program, the VIEW_DEVICE parameter in css.default must be set to the proper device number, e.g. VIEW_DEVICE=901.

The WinCss report view module recognizes some basic formatting codes:

Code | CSS Notation | Formatting
ESC b | \Eb | bold on
ESC B | \EB | bold off
ESC i | \Ei | italic on
ESC I | \EI | italic off
ESC u | \Eu | underline on
ESC U | \EU | underline off

Consequently, the WinCss view device could be defined as:

# view device for reports written for my-printer-model
902|WinCss View Device:vd:\
:tr=\EI1=\Ei: # italic on :\
:tr=\EI0=\EI: # italic off :\
...

To connect this view device to the WinCss(U) program, the WINCSS_VIEW_DEVICE parameter in css.default should be set to the corresponding device number, e.g. WINCSS_VIEW_DEVICE=902. The WINCSS_VIEW_DEVICE parameter defaults to VIEW_DEVICE, in which case no formatting codes should be used.

Formfeed / Linefeed

The ps capability defines the number of lines at 6 LPI the printer will advance between two consecutive form feeds. Printers that remain at their home position when receiving the second formfeed should not define ps (or ps=1) since not doing so, prevents the page parity feature from operating correctly. A ps value of 0 or 1 will cause CSS to never send a explicit formfeed, but to emulate form feeds by an appropriate number of linefeeds. The size information thereto is taken from the forms data base. Any other ps value causes raw form feeds to be sent whenever the form size (see css.forms / ps parameter) is identical.

The cr boolean causes a linefeed to carriage return / linefeed conversion to be performed, when set.

By the use of the pg boolean, a device can be defined to operate in page-printer mode, i.e. to cause the last page of any report to be terminated by a formfeed character. This capability should normally be specified for laser printers.

Character Translation

The tr capability is used to define string or character translations. The input string has to be defined between the first and the second equal '=' character. The output string is defined following the second equal sign. Embedded equal characters in both strings have to be escaped as usual ('\='). No restrictions exist to the size of the of neither of the strings. The output section may define download files and/or include ordering variables like in bo x and eo x. Form, flag, page and line conditions as well as common options can also be specified (syntax see bo x). Of overlapping input strings, the shorter value is favored:

tr=1=A:tr=12=AB:

The second tr string is never translated!

Dynamic condition flags may be used for context sensitive control. If for example a flag shall be set, whenever pattern is found in a document, use:

:tr -s f=pattern=pattern:# retain pattern:\
:eop /f -c f=value...:# next eop, then clear flag:

Escape Translation

To enable the use of the features of today's printer models and still retain device independence, CSS provides a hypothetical printer model. This imaginary printer is sensitive to the control sequences Esc,1 to Esc,127 (hex 0x1B 0x01 up to 0x1B 0x7F). At printout time, these control sequences will be translated to the values defined by the e1 up to e127 capabilities of the target device. If no related entry can be found, the Esc control is silently ignored and no output is performed. For instance, if a device entry defines :e5=^N: and a program writes Esc,5 CSS will send a Cntl-N to the printer. Escape translation can be turned off by the bm capability or temporarily by the B-option of lpr(U). The assignment of the Esc controls to 'real' printer features is up to the user. However, to enable CSS to provide the automatic character pitch selection (see a-option of lpr(U)), the meaning of e1 up to e4 is predefined:

e1 | change print density to 10 cpi (chars per inch)
e2 | change print density to 12 cpi
e3 | change print density to 16.5 cpi
e4 | change print density to more than 16.5 cpi

If a printer in use is not capable to change its character pitch, e1 to e4 should not be defined. If only some of the above cpi changes are not supported, these entries should be defined equal to the next higher (denser) value. If no denser cpi is possible, the sequence for the densest value must be set. The automatic cpi selection (see a-option of lpr(U)) causes CSS to use the lowest possible pitch (i.e. the largest possible font) for the widest line of a report to fit on the current form (see css.forms / ll capability).

The syntax of the e nn capabilities is:

name [-option...]=value

Options without argument may be grouped following a single ‘–’ character. Arguments may immediately follow the option character or may be delimited by a space.

Option | Description
-e | Expand option: The value of the definition is processed in the same way as bo x and eo x capabilities, i.e. the %-variables are substituted and/or control file input is possible.
-p | Pipe option: use the standard output of the command defined by value as capability result. The value definition must start with a slash ‘/’ and may contain options. The named file should have its execution flag set. This option implies the e-option. Note: the p-option is not available in CssNT.
The following options take effect if the capability conditions are met and after output of the value definition is complete. If value requests a file or pipe operation, the options are processed only if the named file or pipe can be located and executed (pipe). To only modify condition flags, empty value strings are allowed.
-c cond | Clear, set condition flag(s) cond to false.
-s cond | Set condition flag(s) cond to true.
-t cond | Toggle condition flag(s) cond from true to false and from false to true respectively.

Summary

The hypothetical printer model used by CSS may have features defined, that are not available on each physical device. Undefined Esc controls in the range between Esc,1 and Esc,127 (e1..e127) are thus discarded during output. This may not be the desired mode of operation e.g. for printers used by word processors. To achieve transparent data delivery without escape translation, automatic pitch selection, cr and pg processing, the target devices should be defined as 'binary mode' (bm) printer. To set a regular CSS device into binary mode for the duration of one single report, the B-option of lpr(U) may be used. In binary mode the lpr(U) a-option is ingnored and the automatic termination of the last page (pg-parameter) is not performed.

Important Note!

In normal operation on a hypothetical CSS device the despooler silently ignores undefined escape codes. If e.g. the lpd program encounters ESC,9 (hex 0x1b 0x09) and no e9-paramter has been defined for the output device, the two character control sequence is discarded and not sent to the printer. If transparent output is required, you have to use binary mode reports.

Remote Printing

The definition of the rpm capability causes CSS to ignore the dv and op parameters and connect to remote devices through TCP/IP sockets. The available settings for rpm are:

Value | Protocol | Description
lpd | BSD lpd | This is the most widely used protocol for remote printing. Almost every print box on the market supports lpd.
rlpd | relaxed lpd | Relaxed lpd is a Unitec variant of BSD lpd. Especially with large reports, it may be considerably faster than its standard counterpart. It is however not supported by each print box. Wherever possible, you should try this protocol prior the use of plain lpd.
rtel | reverse telnet | Rtel is available on some print boxes, but may exist in several variants. The CSS implementation has been fully tested with the Lantronix MPS server.
pros | Axis Pros | Pros can be used with the hardware of Axis Communications.
raw | raw TCP/IP | Some print server boxes allow to directly address their printer interface by specifying a special port number. The raw protocol may be used to connect to such ports.

The rph capability specifies the host address of a remote print server and is a required entry for all protocols. The value can be set in the standard four number notation (e.g. "128.41.1.11") or as symbolic alias name as defined in the TCP/IP hosts file. On Unix systems, this file is located in the /etc directory. On Windows systems the location varies depending on OS type and version. Each line in the hosts file contains the numeric IP address and one or more symbolic alias names.

The rpp capability specifies the TCP/IP port number to be used for the connection to the host identified by the rph entry. The value can be set as number (e.g. "515") or as symbolic alias name as defined in the TCP/IP services file. On Unix systems, this file is located in the /etc directory. On Windows systems the location varies depending on OS type and version. Each line in the services file holds the service name, a port number and a port type (the type should mostly be tcp). Port numbers are usually predefined by the print server manufacturer or by the protocol, it thus makes little sense to use symbolic names. Except for the raw protocol, commonly used defaults are defined.

The rpq capability identifies the queue name of the remote print server. This entry is named differently by almost each manufacturer and also referred to by 'remote port', 'remote service name' or 'remote printer name'. If your hardware has multiple queue names to choose from, you should select a queue that does not perform any implied actions on the data sent to it. If e.g. you get additional empty pages at the end of each report, you may have chosen a queue that appends a form feed to the print jobs it receives. The rpq entry is required by all protocols, except raw.

The rpr capability identifies the remote port number. It is transmitted to the server in the rtel protocol, but not required. It may also be used with pros as an alternative to the rpq parameter to specify the printer number handled by the Axis box (e.g. rpr=2 is the same as rpq=pr2).

The rpw capability identifies the password required to connect to the remote print server. It is used with the pros and rtel protocols. The default for pros is 'netprinter' and for rtel the empty string.

The remote print definitions for a Lantronix MPS server (e.g. named MPS_0d242f) would look like:

:rpm=rlpd:rph=128.41.1.11:rpq=MPS_0d242f_TEXT:...

For an Axis box the definition could be:

:rpm=pros:rph=128.41.1.12:rpq=pr1:...

or equivalent:

:rpm=pros:rph=128.41.1.12:rpr=1:...

Note:

All of the supported remote print protocols have been fully tested with some widely used print boxes. Unitec is unable to provide support for these and future protocols, except for lpd, relaxed lpd and raw.

Notes

Although the use of the Esc control sequences e5..e127 may be assigned freely, for compatibility reasons (e.g. with ulp(U)), we suggest the following standard:

e5 | correspondence quality on
e6 | correspondence quality off
e7 | near letter quality on
e8 | near letter quality off
e9 | elongated printing on
e10 | elongated printing off
e11 | italic printing on
e12 | italic printing off
e13 | underline mode on
e14 | underline mode off
e15 | advance to superscript
e16 | reset superscript
e17 | advance to subscript
e18 | reset subscript
e19 | load alternate character set
e20 | restore primary character set
e21..e127 | unused, at disposition

If a printer model does not support a capability, the corresponding parameters should not be specified. The despooler program lpd will thereafter ignore the escape codes while printing on that device.

Files

Css: |
/usr/lib/css/dev | (Device Database)
CssNT: |
lib\dev | (Device Database)

See also

csa(U), css(P), css.forms, lpr(U), setmode(U)


Css.Forms

Form Definition Data Base

css.forms(C)
Name Platforms Description Capabilities Types Files See also

Name

css.forms

Platforms

Unix, Windows NT

Description

The file css.forms is a data base describing the CSS forms. This data base is used by all CSS programs and utilities. The forms are defined by giving their size in a set of capabilities and by describing how operations are performed.

Entries in css.forms consist of a number of fields separated by colons ':' (similar to termcap(5)). The first entry for each form gives the CSS form class id (not exceeding 3 characters, starting with a letter) and separated by a vertical bar '|' the form name. The name may include spaces for readability but should not exceed 30 characters. Only the last entry of multiple definitions with the same form class id will become active.

IIn contrast to termcap(5) the definitions in css.forms do not serve as a reference for the CSS programs. Rather they have to be compiled with the aid of the csa(U) administrator utility into an internal, very efficient format. Thus any changes to css.forms become active only after a successful compilation.

Capabilities

Name | Type | Description | Default
bp | bool | banner page | false
ilf | bool | ignore leading form feeds | false
ld | num | logical CSS device | 0
ll | num | line length at 10 cpi |
nbp | num | number of banner pages | 1, 2 (pp)
pp | bool | page parity | false
ps | num | page size at 6 lpi |
# | str | comment |

Definitions may continue over to multiple lines by giving a backslash '\' as the last character of a line. Empty fields can be included for readability and are most often used between the last field on a line and the first field on the next. Capabilities in css.forms are of three types: Boolean capabilities, which indicate that the form has some particular feature or that a certain mode of operation shall be applied, numeric capabilities giving the size or count of something, and string capabilities (in this release the only string valued entries are the comments).

Types

All capabilities have a two or more letter code. For instance, the fact that a form shall be handled in 'page parity' mode is indicated by the capability pp. Numeric capabilities are followed by the character '=' and then their decimal value.

Finally, string valued capabilities, an '=', and then a string ending at the following ':'.

The fact, that a given form shall only be mounted on one particular device, is specified by the ld capability. A value of zero or a missing ld entry signals, that the form may be mounted on any CSS devices.

The physical page length of a form is defined by the ps parameter. The length is entered in number of lines at 6 lpi (lines per inch).

The physical line length is defined by the ll parameter. The length is entered in number of characters at 10 cpi (characters per inch).

The boolean capability pp (page parity) causes CSS to print each report on that form on an even number of pages by adding an empty page at the end of the printout, if necessary.

To suppress leading empty pages, the ilf capability (ignore leading form feeds) may be used. This allows e.g. Cobol programmers to print all headers (including the first page) with the carriage control AFTER PAGE without generating an empty page and thus to avoid a structure clash in the program flow.

Printing of one or more banner pages is controlled by the bp capability. However, banner pages are generated only, if the device used includes the corresponding entry with the same name. The nbp capability defines the number of banner pages to print. It defaults to one, or - if page parity is set - to two pages.

Files

Css: |
/usr/lib/css/form | (Forms Database)
CssNT: |
lib\form | (Forms Database)

See also

csa(U), css(P), css.devices, lpr(U)


Ulm.Default

ULM Environment

ulm.default(C)
Name Platforms Description Parameters Notes See also

Name

/etc/ulm.default

Platforms

Unix, Windows NT

Description

Ulm.default contains the definitions of system-wide ULM license manager parameters. Each command searches for this file whenever it is invoked. The file contains one or more entries that define the default information. Each entry has the form:

NAME=Value

where keyword identifies the type of information available and value defines its value. Both keyword and value must consist of letters, digits and punctuation. The exact spelling of a keyword and the appropriate value are described in the following table. In contrast to parameter values, parameter names (keywords) are case insensitive.

Any line beginning with a number sign (#) is considered a comment and is ignored.

Parameters

Keyword | Description | Default
ULM_VERSION | Installed license manager version. This entry is generated by the setup(I) process and should never be changed. |
ULM_BASE_DIR | Base directory that holds ULM programs, configuration tables and data. | /usr/lib/ulm

Notes

If /etc/ulm.default is missing, ULM will run with the default configuration.
Important!

If the directory entries (x_dir) do not correspond to the current configuration, ULM will not be able to run correctly.

See also

setup(I), ulm(I)


WinCss

Windows Interface

WinCss(C)
Name Platforms Description Notes See also

Name

WinCss

Platforms

Win32 (Windows 95/98, Windows NT)

Description

The installation process of WinCss follows the common Windows standards. The first time the new program is started, it will prompt for the IP address of the CSS print server and the TCP/IP port number with the default value of 6801. If this port number is already used in your network, the network administrator has to assign another number which has to be entered here. Additional manual server configurations have to be done in this very unlike situation.

The following sections describe the necessary actions:

1. TCP/IP Ports and Services

To establish a TCP/IP Client-Server connection, the client (WinCss) must know the IP address of the system providing the server functionality. In addition, each connection type (e.g. cssws to WinCss) is identified through a unique port number. The TCP/IP services file defines symbolic names for most of the ports used in a network environment. Using these symbolic service names requires the services file to be present on each network nodes, i.e. on the host and on all client systems. On Unix systems, the file is located in the /etc directory. On Windows systems the location varies depending on OS type and version. Each line in the services file holds the service name, a port number and a port type (for CSS the type should always be tcp). To avoid conflicts with standard TCP/IP ports, these numbers should have values > 5000 assigned by convention. Unitec products use port numbers in the range from 6800 to 6999.

Since in heterogeneous environments the administration of the services files requires considerable work, there has recently emerged the trend to define so called well known ports for each connection type. For the WinCss connection the port 6801 has been defined as the default. To avoid conflicts with other software packages another port number may be assigned during setup of WinCss. This value is then stored string variable CssPort located in the Windows registry under

HKEY_LOCAL_MACHINE\SOFTWARE\Unitec\WinCss\CurrentVersion

For all CSS servers (Unix and Windows NT) the port number is defined in the WINCSS_PORT parameter of the configuration file css.default.

In addition, the programs cssws(U) and WinCss allow to specify TCP/IP configuration settings as command line arguments. Example:

cssws -p 7001 | the Unix WinCss server should use port number 7001 to provide its services
WinCss -h 128.41.1.1 -p 7001 | the WinCss client connects itself with the CSS server located on the host with the IP address 128.41.1.1 using the port number 7001

2. CSS Server Configuration (Unix)

As with any server process, the program /usr/lib/css/cssws has to be spawned at system startup. Several system services (e.g. /etc/rc(4) or /etc/inittab(4)) allow to configure automatic server invocation.

/etc/rc

/usr/lib/css/cssws 2>/dev/null 1>&2

Unix System V only

The same service can be established on System V by inserting the following line in /etc/inittab(4):

cssws:1:respawn:/usr/lib/css/cssws 2>/dev/null 1>&2

Internet Super Server (inetd)

Since the Internet Superserver inetd(1) requires to use symbolic service names, you must first edit your /etc/services file and add the line:

cssws 6801/tcp # WinCss server

Then edit your /etc/inetd.conf file and add the lines:

# CSS Service
cssws stream tcp nowait root /usr/lib/css/cssws -i

The inetd(1) process reads configuration file /etc/inetd.conf at startup to initialize itself. This will make the cssws(U) services available for connections through WinCss.exe on the Windows client.

Unless started by the init(1) program, cssws(U) will detach automatically from the calling process.

3. CssNT Server Configuration (Windows NT)

The WinCss services are provided from the program CssNTSrv. This program is installed as NT service by Setup and will be started automatically at system startup.

4. CSS Client Configuration (Win32)

The WinCss program is designed to operate in two different modes. In standard operation, the tool buttons of the small toolbar window are added to the Report Queue window which then acts as the main window. You may however choose to use the small toolbar window (documented in the Windows Help file) as main window. The command line flag -m or /m can be used to turn tool window mode on. This flag can be preset after each installation in the properties of WinCss.exe in the WinCss program folder.

In addition, the -h or /h option may be used to specify the IP address of the server and -p or /p to use a specific port number. This feature makes it possible to connect to several different CSS servers concurrently.

The CssNT server uses the NT Security Model to determine user access rights.

In order to provide access security, the WinCss software needs to know the Unix user name or UID. On 32 bit systems, this information will by default be read through the GetUserName API function and on 16 bit systems from the environment variable USER. If a different variable is used (e.g. UNIXUSER), it has to be defined in the registry (Windows 95 and NT) or in the file css.ini (Windows 3.1x) located in the Windows directory:

WinCss-Registry-Key, Value UserEnv

or

...
[Environment]
UserEnv=UNIXUSER
...

Unix user information may also be obtained from another .ini file. The following css.ini definitions will cause css.exe to get the user information from the entry USERNAME in the section Network in file system.ini:

...
[Environment]
UserIniFile=system.ini
UserIniSection=Network
UserIniKeyWord=USERNAME
...

If WinCss is unable to obtain user information by the above rules, login is done as guest.

If an css.ini file is created in the target directory of a file server installation, the host name or address will be proposed as the default selection in further workstation installations and propagated into the registry or css.ini of the Windows directory (Win 3.1x). The registry location of all WinCss parameters is

HKEY_LOCAL_MACHINE\SOFTWARE\Unitec\WinCss\CurrentVersion

Running WinCss / Troubleshooting

Make sure that you have followed the steps described above and that the setup.exe program has completed without any errors. You are now ready to start WinCss. If the program fails to start or an error message is shown, please double check your TCP/IP system files. After you have done the necessary corrections, you will have to shut down the Unitec Communication Manager Ucm.exe. This process has been started automatically and is running invisible on your system. To stop it, type Ctrl-Alt-U and you will see its icon on the Windows task bar. Click the right mouse button on the icon and select Close in the pop up menu. If a warning window is shown, select the Close button and ignore the warning. You may now retry to run WinCss.

The utility CssVerCk.exe may be used to resolve version conflicts with installed Windows components.

5. Automating the WinCss setup procedure

The installation program (e.g. WinCss400.exe) accepts the following command line options:
/S Silent mode, automatic mode with no user choices. All actions and installation errors are logged in the file INSTALL.LOG located in the target folder.
/M=filename Specifies a value file for installation. The value file is a simple text file with variables listed, one per line, in NAME="VALUE" format. The double quotes are required only if the VALUE field includes embedded spaces. The NAME field is case insensitive. The following values may be set:
Name | Value
CssHost | Specifies the IP address or the host name of the CSS server. The value does not overwrite already existing registry entries, i.e. has no effect on upgrade installs.
CssPort | Specifies the port number or service name to be used for connections to the CSS server. The value does not overwrite already existing registry entries. It defaults to port number 6801.

Notes

The WinCss software needs to be registered and serialized with the ulm(I) program.

See also

init(1), setup(I), ulm(I)


Virtual Server Configuration

Virtual CSS Server

VirtualServer(C)
Name Platforms Description Notes

Name

Virtual CSS Server

Platforms

Unix

Description

CSS is capable of providing several independent print server environments on one system. To operate in such an environment, the CSS_ENV variable must point to the home directory of the Virtual CSS Server. Setting CSS_ENV to the value "/" will cause the CSS programs to run in the standard (main) environment.

Setting CSS_ENV

• Bourne Shell sh(1), Bourne Again Shell bash(1)

.profile (sh) .bashrc (bash) | CSS_ENV=/usr/css1 export CSS_ENV
shell prompt | CSS_ENV=/usr/css1 export CSS_ENV
temporarily | CSS_ENV=/usr/css1 command [option...]

• C-Shell csh(1)

.login | setenv CSS_ENV /usr/css1
shell prompt | setenv CSS_ENV /usr/css1
temporarily | NA

Virtual CSS Server Directory Stucture

The home directory for each virtual server must contain the following sub-directories:

Directory | Contents
etc
File | Contents | Optional
css.default | configuration parameters |
css.devices | device definitions |
css.forms | form definitions |
css.banner | banner message of the day | yes
lib | Internal CSS control files such as compiled device and form definitions, the report queue and others.
spool | Optional directory for intermediate spool files. May be overwritten by setting the CSS_SPOOL_DIR parameter in $CSS_ENV/etc/css.default.

A typical setup session:

# if not registered yet, enter virtual server license (type CVS)
CSS_ENV=/  /etc/ulm
# setup directory structure:
umask 0
mkdir /usr/css2
cd /usr/css2
mkdir etc lib
# register user activation keys (type CSS and WinCss)
CSS_ENV=/usr/css2  /etc/ulm
# copy and modify CSS configuration files
cp /etc/css.*  ./etc
vi ./etc/css.*
# compile device and form definitions, initialize report queue
CSS_ENV=/usr/css2  /etc/csa -d -f -R

Device Sharing

To share devices among several virtual CSS environments, the external lock feature of css.devices (el capability) must be used. It is mandatory that each logical device using a particular physical device has the identical el capability value defined. Devices in use by another virtual server or software package will show the busy status in the css(U) interface program.

Configuration Parameters Needing Special Attention

Setting the CSS_SPOOL_DIR configuration variable of distinct CSS environments to the same directory will result in data loss.

The WINCSS_PORT configuration variable should be set to a distinct port number for each virtual CSS environment. As an alternative, you can use the cssws(U) p-option to set individual port numbers. One cssws(U) windows server must be started for each virtual environment at boot time.

Sample /etc/rc setting:

• WINCSS_PORT set in each css.default file

...
CSS_ENV=/ /usr/lib/css/cssws
CSS_ENV=/usr/css2 /usr/lib/css/cssws
...

• WINCSS_PORT not set

...
CSS_ENV=/ /usr/lib/css/cssws -p 6851
CSS_ENV=/usr/css2 /usr/lib/css/cssws -p 6852
...

Notes

Each virtual CSS server requires its own license to operate. The Unitec product code of this license type is CVS. FreeCSS cannot operate in virtual mode.


Virtual Server Css.Default

Virtual CSS Environment

css.default(C)
Name Platforms Description Parameters Notes

Name

$CSS_ENV/etc/css.default

Platforms

Unix

Description

Css.default for virtual CSS servers contains the definitions of virtual server-wide CSS parameters. Many of the parameters inherit the values of the global css.default file as a default. Each command searches for this file whenever it has been invoked within a virtual environment.

The css.default file for virtual servers contains one or more entries that define the default information. Each entry has the form:

keyword=Value

where keyword identifies the type of information available and value defines its value. Both keyword and value must consist of letters, digits and punctuation. The exact spelling of a keyword and the appropriate value are described in the following table.

Any line starting with a number sign (#) is considered a comment and is ignored.

In contrast to parameter values, parameter names (keywords) are case insensitive.

Parameters

In the current CSS version, the following virtual server configuration parameters are available:

Name

Description Default Value
AUTO_REORG Automatic reorganization of the report queue upon the first call of the css(U) program per day (removal of reports whose keep date has expired):
no: | no reorganization
all: | all reports with keep date expired
printed: | all reports with keep date expired and that have been fully printed

See also csa(U), k- and K-options.

setting in /etc/css.default
BANNER_MARGIN | Normally banners print from the first to the last line of the page. On misadjusted forms, this may cause report pages to have banner lines printed on. To avoid this effect, the BANNER_MARGIN parmeter may be used to set the top and bottom margins of banner pages. | setting in /etc/css.default
BINARY_VIEW | Enable / disable the view of binary type reports in the css(U) dialog: true or false. We recommend to disable this option for end-users. | setting in /etc/css.default
CSS_SPOOL_DIR | Directory where CSS will store report requests. | $CSS_ENV/spool
DATE_TYPE Date format to bu used in the css(U) dialog screens:

AM, US: | MM/DD/YY
EU: | DD.MM.YY
IN: | YY/MM/DD
 setting in /etc/css.default
DEFAULT_FORM | Defines the default form, if the f-option of lpr(U) is not specified. | setting in /etc/css.default
DEFUALT_DEVICE | Defines the default device, if the d-option of lpr(U) is not specified. | setting in /etc/css.default
DEV_STOP_TIMEOUT | This parameter controls the behavior of the lpd despooler program on stop request for active printouts. If it is set to a value other than zero, the despooler process will stop after the defined number of seconds are elapsed, even if the current page has not been spooled completely. The device and the current report are set to the 'hold' state. Please note, that even if DEV_STOP_TIMEOUT has been set, it might be possible, that the process is unable to terminate. Many Unix systems do not allow a process to stop if it is performing an output operation that the OS has not yet been able to complete (typically if a printer is turned off). As soon as the printer is switched on again, this feature should behave as expected. In order to give CSS a chance to stop after the current page has been processed, this parameter should be set to a reasonable value (e.g. 90). The default value is 0 (zero, no timeout processing). | setting in /etc/css.default
ERRLOG_SIZE | This parameter sets the size of the CSS lpd error log file css.errlog in KB. Once the file reaches the defined size, it is reset and any previously recorded information is lost. | setting in /etc/css.default
JOB_FLAGS | This parameter may be set to true to mimic prerelease 3.4 condition flag behavior. For details refer to the migration notes in Chapter 1. | setting in /etc/css.default
LANGENV | This parameter may specify an environment variable name to be inspected for css(U) dialog language information. If set, the variable takes precedence over the LANGUAGE parameter but may be overwritten by L-option of css(U).
LANGUAGE | Language to be used in the css(U) dialog screens:dutch, english, french oder german | setting in /etc/css.default
PROTECTION Protection to be applied in the report queue maintenance:
user: | user ID
group: | group ID
none: | no protection
 setting in /etc/css.default
PUBLIC_GROUP | Reports owned by any group specified in this parameter will be accessible by all users, despite the setting of the PROTECTION parameter. By default a new report will be owned by the creating user and the group associated with that user. Ownership may also be controlled by the lpr(U) u- and g-options. This parameter may define one or more groups (name or numeric ID), delimited by the pipe symbol ‘|‘ or by comma ‘,’.
PUBLIC_USER | Reports owned by any user specified in this parameter will be accessible by all users, despite the setting of the PROTECTION parameter. This parameter may define one or more users (name or numeric ID), delimited by the pipe symbol ‘|‘ or by comma ‘,’.
SHOW_CSSFLAGS | Causes to show the d-, u- and x-option flags in appropriate screen headers of the css(U) dialog, when set to true. | setting in /etc/css.default
TEST_PRINT | Enable / disable the test-print feature after form changes through css(U): true or false | setting in /etc/css.default
TEST_PRINT_ACHAR | Substitution character of alphabetic characters during test-print through css(U). | setting in /etc/css.default
TEST_PRINT_NCHAR | Substitution character of numeric characters during test-print through css(U). | setting in /etc/css.default
VIEW_CONTROL_CHAR Defines the substitution character of nonprintable values in the report view screen of css(U). Control characters are from 0x00 through 0x19, 0x7f and 0xff, except CR, LF, BS and TAB. The following values are possible:
space: | use 0x20, space
null: | do not show
x: | use character x
 setting in /etc/css.default
VIEW_DEVICE | Defines the device definition to use to display a report in the css(U) report preview screen.
WINCSS_PORT | Defines the TCP/IP port number to be used by the Windows server cssws(U).
WINCSS_VIEW_DEVICE | Defines the device definition to use to display a report in the WinCss(U) report preview screen. | setting in VIEW_DEVICE
WRAP_SCREEN | Enable / disable the navigation default in the css(U) dialog to wrap screens from last to first. | setting in /etc/css.default

Notes

If $CSS_ENV/etc/css.default is missing, CSS will run with the default configuration.

Important!

If the directory entry CSS_SPOOL_DIR points to a location used by another virtual CSS server, data loss will occur.


Programming

Chapter 5 - Programming
5.1. Overview

This chapter serves as reference to the software developer wanting to utilize the extended print capabilities of CSS. It covers descriptions to unique features such as document embedded control (inclusion of lpr(U) options within the print file) as well as devices independent programming through the use of the CSS hypothetical printer model.

Important!

In order to maintain backward compatibility to previous CSS versions, the C interface css_fstat remains supported. Since starting with Release 2.7, extended form ids are supported, the new module css_formstat takes its place.


CssFormstat

C-Interface / Get Form Status

css_formstat(P)
Name Platforms Synopsis Description Diagnostics Examples Files See also

Name

css_formstat

Platforms

Unix, Windows NT

Synopsis

#include "css.h"

struct css_forminfo
    *css_formstat(f);
char *f;

Description

Css_formstat searches the forms database for an entry with id fid and returns a pointer to information thereto. The structure css_forminfo contains static data that will be overwritten by each call.

struct css_forminfo
{
    char  cfi_form[4];       /* form-id / strlen=3 */
    char  cfi_name[31];      /* form-name / strlen=30 */
    char  cfi_pp;            /* page-parity T/FALSE */
    short cfi_ps;            /* page-size */
    short cfi_ll;            /* line-length at 10 CPI */
    short cfi_devnr;         /* mount only on devnr */
                             /* (0 = any) */
};

Diagnostics

Diagnostics Upon successful completion css_formstat returns a pointer to a static css_forminfo structure. If no form fid can be found, a NULL pointer is returned.

Examples
#include "css.h"

struct css_forminfo *cfi;
int ps = 48;       /* default page size */

if (cfi = css_formstat("A4q"))
    ps = cfi->cfi_ps;

Files

Css: |
/usr/lib/css/form | (Forms Database)
CssNT: |
lib\form | (Forms Database)

See also

css, css.forms(C)


Program Interface

CSS Program Interface

CSS(P)
Name Platforms Description Files See also

Name

css

Platforms

Unix, Windows NT

Description

Report programs can communicate with CSS in three different ways:

1.) Lpr-Parameter

Lpr parameters may be set in the first line of a print file (document embedded control).

Free format:

Position | Content
1..7 | '++CSS++' / CSS parameter identification
8..n | any lpr(U) options

The parameter record must be terminated by a carriage return or linefeed. This format should be favored, since it allows to specify all possible lpr(U) options.

Example:

++CSS++ -a -f B -d Laser1 -t 'Invoices'

Fixed format:

Position | Content
1..9 | ##CSS03## / CSS parameter identification (version 3)
10..12 | Form ID
13..13 | Form subtype (see also fdu(U))
14..14 | Automatic character pitch selection: Space = no / <> Space = yes
15..30 | 0..999 / Device number (three digits) / 0 = any device, or device name (16 characters)
31..32 | 0..99 / number of copies to print / 0 = 'hold'
33..62 | Report title
63..63 | Disposition after printout: Space, E, e = erase / D, d = keep until date
64..73 | Keep date DD.MM.YYYY
74..81 | Employee-ID
82..95 | Program-ID
96..107 | Banner page Title

The parameter record may be truncated at the right. It must however be terminated by a carriage return or linefeed.

Example:

##CSS03##A4qA00 02

This report will be printed on form A4q, device 0 (any system printer (i.e. as printer)), two copies with automatic character pitch selection.

Example Cobol:

*
*    COMMERCIAL-SPOOLING-SYSTEM PARAMETER
*
  01     CSS.
     02  FILLER           PIC X(9)   VALUE "##CSS03##".
     02  CSS-FORM         PIC X(3)   VALUE "A".
     02  CSS-SUBFORM      PIC X      VALUE SPACE.
*                        .Form ID
     02  CSS-AUTOCPI      PIC X      VALUE SPACE.
*                        .A = Automatic CPI
*                             selection according
*                             to the longest line
     02  CSS-DEVICE-NAME.
      03 CSS-DEVICE       PIC 9(3)   VALUE ZERO.
      03 FILLER           PIC X(13)  VALUE SPACE.
*                        .Device-ID / -Name
*                         0 = Auto-select
     02  CSS-COPYS        PIC 99     VALUE 1.
*                        .Number of copies
*                         0 = hold
     02  CSS-RNAME        PIC X(30)  VALUE SPACE.
*                        .Report title
     02  CSS-KEEP         PIC X      VALUE "E".
*                        .E,SPACE = print, erase
*                        .D = Keep until date
     02  CSS-KDAT         PIC X(10)  VALUE SPACE.
*                        .Keep date (DD.MM.YYYY)
     02  CSS-MKZ          PIC X(8)   VALUE SPACE.
*                        .Employee-ID
     02  CSS-PGMNAME      PIC X(14)  VALUE SPACE.
*                        .Program name
     02  CSS-BANNER       PIC X(12)  VALUE SPACE.
*                        .Banner page text
* *****END CSS.P
.....
    MOVE "A" TO CSS-AUTOCPI.
    MOVE 2 TO CSS-COPYS.
    MOVE "Customer Report" TO CSS-RNAME.
    OPEN OUTPUT R0.
    WRITE R0-LINE FROM CSS AFTER 0.
.....

The parameter format of previous CSS versions (##CSS##, ##CSS01## and ##CSS02##) are still supported.

2.) Escape Sequences

As described in css.devices(C), the various printer options may be controlled by the Esc controls Esc,1 to Esc,127 (e1..e127).

Example Basic:

10 REM ELONGATED PRINTING
20 LPRINT CHR$(27); CHR$(9);  "wide Text"
30 LPRINT CHR$(27); CHR$(10); "normal Text"

Example Cobol:

*
*    CSS-CONTROL
*
  01     CSS-CONTROL.
     02  CSS10CPI.
      03 FILLER          PIC 9(4) COMP-1 VALUE 6913.
*                       .=ESC,1
*                       .=(27 * 256) + 1
     02  CSS12CPI.
      03 FILLER          PIC 9(4) COMP-1 VALUE 6914.
     02  CSS16CPI.
      03 FILLER          PIC 9(4) COMP-1 VALUE 6915.
     02  CSS18CPI.
      03 FILLER          PIC 9(4) COMP-1 VALUE 6916.
......
     02  CSSEL.
      03 FILLER          PIC 9(4) COMP-1 VALUE 6921.
     02  CSSNOEL.
      03 FILLER          PIC 9(4) COMP-1 VALUE 6922.
......
     WRITE R0-LINE FROM CSSEL AFTER 0.
     MOVE "Elongated Text" TO R0-LINE.
     WRITE R0-LINE AFTER 1.
     WRITE R0-LINE FROM CSSNOEL AFTER 0.
     MOVE "Normal Text" TO R0-LINE.
     WRITE R0-LINE AFTER 1.

Example C:

/* eprint: print stdin elongated */

#include "css.h"

#define CSS(f,p) fprintf(f, "\033%c", p)
#define ELON 9
#define ELOFF 10

char *progName;
char *lpr = "lpr -p eprint";

main(argc, argv)

int argc;
char *argv[];
{
    FILE *pFp, *popen();
    register int c;

    progName = argv[0];
    if ((pFp = popen(lpr, "w")) == NULL)
    {
        fprintf(stderr, "%s: can't run %s\n", progName, lpr);
        exit(1);
    }
    CSS(pFp, ELON); /* start elong. */
    while ((c = getchar()) != EOF)
        putc(c, pFp);
    CSS(pFp, ELOFF); /* stop elong. */
    pclose(pFp);
    return 0;
}

3.) Form Information

The form capabilities that have been defined in css.forms(C) may be referenced by the use of the CSS C interface. In combination with the automatic character pitch selection, it is thus possible to develop programs that are independent from the physical form size:

#include "css.h"

struct css_forminfo *cfi;
int ps;   /* page size */

if (cfi = css_formstat("b"))
    ps = cfi->cfi_ps;
else
    /* unknown form, use default */
    ps = 48;

The command line of the compilation must include the object module css_fstat.o:

cc -o prog prog.c css_fstat.o ...

The distribution for systems with small-, medium- and large-compilers contains all three modules. The compiler model is indicated a file prefix S, M and L.

Files

Css: |
/usr/lib/css/form | (Forms Database)
CssNT: |
lib\form | (Forms Database)

See also

lpr(U), css.forms(C)


Copyright Notice

WinCss CSS Windows Interface Release 4.0

Copyright © 1996-2000 by Unitec Informatik. All rights reserved.

Information in this document is subject to change without notice and does not represent a commitment on the part of Unitec Informatik. The software described in this document is furnished under a license agreement or nondisclosure agreement. The software may be used or copied only in accordance with the terms of the agreement. It is against the law to copy the software on any medium except as specifically allowed in the license or nondisclosure agreement.
Warning: Unauthorized reproduction or distribution of this program, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under law.

Unix is a registered trademark of AT&T Bell Labs Incorporated.
Unitec is a registered trademark of Unitec Informatik, Switzerland.
Windows, Visual Basic, Excel, Word, Project and Power Point are registered trademarks of Microsoft Incorporated.