ASSIGN-PRINTER

Specifies how to assign the output from an ASSIGN TO PRINTER clause when the clause does not specify a filename.

Syntax:

>>-.---.-.----ASSIGN-PRINTER.-"filename"-.-.-><
   +-/-+ |                  +-""---------+ |
         +--NOASSIGN-PRINTER---------------+

Parameters:

filename
The file to be associated with the ASSIGN TO PRINTER clause.

Properties:

Default: NOASSIGN-PRINTER
Phase: Syntax check
$SET: Any

Dependencies:

DIALECT"RM" sets ASSIGN-PRINTER"" immediately.

Comments:

This directive has no effect if you specify a filename as part of the ASSIGN TO PRINTER clause.

ASSIGN-PRINTER"filename" causes the output to be directed to the filename specified. The filename can be fully specified, including a path-name, base-name, and extension.

ASSIGN-PRINTER() results in the same behavior as including the following COBOL statement:

 select filename-1 assign to printer filename-1

That is, the filename used in your COBOL program is also used as the filename for your output. If the internal filename is too long for your operating system to handle, it is truncated to the maximum length the operating system allows.

By default, the filename does not include an extension, but you can specify an extension by using the PRINT-EXT directive.