PRINT

Specifies the destination of the source listing file.

Syntax:

>>-.---.-.-------PRINT-.-"destination"-..--><
   +-/-+ |             +-()------------+|
         +.----.-PRINT------------------+
          +-NO-+

Parameters:

destination A full file specification, or a device-name.

Properties:

Default: NOPRINT
Phase: Syntax check
$SET: Any

Comments:

PRINT is synonymous with LIST.

If you specify an existing file, it is overwritten.

When NOPRINT is specified, no source listing is produced. If you specify PRINT with no destination, the source listing is sent to the screen. If you specify either destination or (), you cannot use this directive in a $SET statement.

destination can be the name of any suitable device. Use CON: for the screen.

NOPRINT and PRINT with no parameter can be used in $SET statements in a program to list selected parts of the program. The destination of the listing cannot be changed in this way.

PRINT() causes the source listing to be put in the file source-name.lst, where source-name is the basename of the filename of the program being compiled.

If you want to list the source to a file for every compilation you do, place the PRINT() directive in the cobol.dir file. This overrides the default NOPRINT.

Alternatively, if you already have a PRINT directive in your cobol.dir, making every listing go to the screen, you can override it by using PRINT() on the command line.