PrintDir

From BR Wiki
Jump to navigation Jump to search

The PrintDir configuration statement places a copy of all print files spooled by BR into the specified directory. When BR sends the file to the spooler, it makes a copy of the file using the main active program name with a suffix of the channel number (default is 255).

Syntax

PRINTDIR directory-path  [+DATE] [+TIME] [+LOGIN_NAME] [+CHANNEL] [\LOGIN_NAME] [RAW]

The +DATE, +TIME and +LOGIN_NAME pertain to the output base filename. The \LOGIN_NAME keyword inserts a directory name after directory-path. +CHANNEL replaces the filename suffix prt with the channel number of the Open statement used to create the report.

For example, a payroll program (PRREG) prints a register using the following open statement:

OPEN #40: "Name=PRN:/LASER2,Recl=133", DISPLAY, OUTPUT

BR stores a copy of the report in {pathname}\PRREG.40

This option is also available through the CONFIG command.

Optional Keywords

The PRINTDIR statement has the following optional keywords (as of 4.3):

( Note- each keyword is separate and must be separated from preceding specifications by one or more spaces. )

+DATE Adds the system date to the report filename.

+TIME Adds the system time to the report filename.

+LOGIN_NAME Adds the user’s login name to the filename.

+CHANNEL Adds the OPEN file number to the filename (previously the default file suffix).

RAW Stores the PRINTDIR file in an untranslated format. This permits subsequent printing of the output to a variety of destinations with corresponding printer translation specifications. (e.g. TYPE filename PRINTER_TYPE=NWP >display-file –or- TYPE filename >DIRECT:/HP where HP is a case sensitive Windows printer name substring )

\LOGIN_NAME Stores the file in a subdirectory to the specified directory-path which is named the same as the user’s login name.

Examples

PRINTDIR  pathname  +DATE +TIME +CHANNEL 

Produces a display file:

pathname\program-date-time.255

PRINTDIR pathname RAW  \LOGIN_NAME 

Produces a display file:

pathname\login_name\program.prt

which can subsequently be TYPEd using various printer definitions.