PRINT Statement

<print statement>

          ┌◄─────────── , ──────────┐
── PRINT ─┴─ <print specification> ─┴────────────────────────────────────────►
►─┬───────────────────────────────────────────────────────────────────────┬──┤
  └─ ; ── PRINTDEFAULTS ── = ── ( ── <printdefault assignment list> ── ) ─┘

<print specification>

──┬─ <file title> ──────┬─┬────────────────────────────────────────┬───┤
  └─ <directory title> ─┘ │     ┌◄──────────── , ────────────┐     │
                          └─ ( ─┴─ <print attribute phrase> ─┴─ ) ─┘

<print attribute phrase>

──┬─ <Boolean print attribute> ─┬────────────────────────────────┬─────┤
  │                             └─ = ── <Boolean expression> ────┤
  ├─ <integer print attribute> ── = ── <integer expression> ─────┤
  ├─ <mnemonic print attribute> ── = ── <file mnemonic primary> ─┤
  ├─ <string print attribute> ── = ── <string expression> ───────┤
  └─ <title print attribute> ── = ── <file title> ───────────────┘

<printdefaults assignment list>

  ┌◄─────────────────────────────┐
──┴─┬─<print attribute phrase>─┬─┴─────────────────────────┤
    ├─<print modifier phrase>──┤
    └─ ─ ─┬─<print modifier>───┤
          └─<print attribute>──┘

<print modifier phrase>

──┬─<Boolean print modifier>─┬───────────────────────────┬─────────────┤
  │                          └─ = ──<Boolean expression>─┤
  ├─<mnemonic print modifier>── = ──<mnemonic>───────────┤
  ├─<string print modifier>── = ──<string expression>────┤
  └─<integer print modifier>── = ──<integer expression>──┘

Explanation

The PRINT statement passes a print request to the Print System for processing.

The print specifications in the PRINT statement specify the files to be printed or punched. Each print specification can include its own print attribute phrases, which affect only the specified file or directory.

Various print attribute phrases can be included in the PRINT statement to specify print-related file attributes that control the creation, routing, and formatting of backup files. Refer to print-related task and file attributes in the Print System User’s Guide, and to general file attributes in the File Attributes Programming Reference Manual for more information.

The PRINT statement also enables you to print nonbackup files, such as symbol and data files. Nonbackup files are formatted for printing by the CANDEWRITER transform function supplied in the PRINTSUPPORT library, unless the PRINTPARTIAL file attribute includes a column range specification. However, you can use other transform functions for nonbackup files by specifying them through the TRANSFORM file attribute. The CANDEWRITER transform function formats the lines from a backup file in a format similar to that produced by the CANDE WRITE command. The actual printed format depends on the FILEKIND of the file.

The following tables list the print-related file attributes and shows the correspondence between the types discussed in the File Attributes Programming Reference Manual and those discussed in this manual.

File Creation

Print Attribute

File Attribute Type

WFL Type

PRINTCHARGE

Pointer

<string print attribute>

PRINTDISPOSITION

Mnemonic

<mnemonic print attribute>

SAVEPRINTFILE

Boolean

<Boolean print attribute>

Routing

Print Attribute

File Attribute Type

WFL Type

AFTER

Pointer

<string print attribute>

DESTINATION

Pointer

<string print attribute>

PRINTDISPOSITION

Mnemonic

<mnemonic print attribute>

PRINTERKIND

Mnemonic

<mnemonic print attribute>

TRAINID

Mnemonic

<mnemonic print attribute>

AFTER requires a string in the form of a <starttime spec>.

Formatting

Print Attribute

File Attribute Type

WFL Type

ALIGNFILE

Pointer

<title print attribute>

ALIGNMENT

Boolean

<Boolean print attribute>

BANNER

Boolean

<Boolean print attribute>

CHECKPOINT

Boolean

<Boolean print attribute>

FORMID

Pointer

<string print attribute>

NOTE

Pointer

<string print attribute>

PAGECOMP

Pointer

<string print attribute>

PRINTCOPIES

Integer

<integer print attribute>

PRINTPARTIAL

Pointer

<string print attribute>

TRANSFORM

Pointer

<string print attribute>

The maximum length of the FORMID string is 100 characters. The maximum number of PRINTCOPIES is 1000.

Print modifier phrases can be included in a PRINT statement to specify additional requirements for the processing of a print request. Print modifiers can be used with a PRINT statement only through the PRINTDEFAULTS task attribute. For more information, see print modifiers in the Print System User’s Guide.

The print modifiers and their WFL types are listed in the following table.

Print Modifier

WFL Type

DOUBLESPACE

<Boolean print modifier>

HEADER

<mnemonic print modifier>

PRINTPRIORITY

<integer print modifier>

REQUESTNAME

<string print modifier>

REQUESTNOTE

<string print modifier>

SUPPRESS

<Boolean print modifier>

TRAILER

<mnemonic print modifier>

A PRINTDEFAULTS specification can be included at the end of a PRINT statement to provide a new set of default values for some print-related file attributes and print modifiers. These values replace defaults that were inherited from the job or from the system.

The print attribute phrases and print modifier phrases that appear in the printdefaults assignment list are merged into the current print defaults. The print modifier and print attribute forms reestablish the system default value for that print modifier or print-related file attribute.

If a print specification and the PRINTDEFAULTS specification both assign values to the same print-related file attribute, then the value assigned in the print specification takes precedence. For details, see the precedence of file attributes and print modifiers in the Print System User’s Guide.

The PRINTDEFAULTS task attribute can be used to establish default values for print modifiers and some print-related file attributes used in a job or task. This eliminates the need to specify values in each PRINT statement. This attribute is described under PRINTDEFAULTS Assignment, and in the Task Attributes Programming Reference Manual.