PrintDir: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
Line 33: Line 33:


produces a display file:
produces a display file:
Pathname\program-name+date+time+255.txt
 
Pathname\program-name+date+time+255.txt
 
  PRINTDIR pathname RAW  \LOGIN_NAME  
  PRINTDIR pathname RAW  \LOGIN_NAME  


produces a display file:   
produces a display file:   
pathname\login-name\program-name.txt  
 
pathname\login-name\program-name.txt  


which can subsequently be TYPEd using various printer definitions.
which can subsequently be TYPEd using various printer definitions.

Revision as of 17:14, 22 September 2014

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]

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):

+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 and named the same as the user’s login name.

Examples

PRINTDIR  pathname  +DATE +TIME +CHANNEL 

produces a display file:

Pathname\program-name+date+time+255.txt

PRINTDIR pathname RAW  \LOGIN_NAME 

produces a display file:

pathname\login-name\program-name.txt

which can subsequently be TYPEd using various printer definitions.