PrintDir: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(6 intermediate revisions by 2 users not shown)
Line 16: Line 16:
===Optional Keywords===
===Optional Keywords===
The PRINTDIR statement has the following optional keywords (as of 4.3):  
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.
+DATE Adds the system date to the report filename.
Line 27: Line 29:
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 )
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.  
\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====
====Examples====
  PRINTDIR  pathname  +DATE +TIME +CHANNEL  
  PRINTDIR  pathname  +DATE +TIME +CHANNEL  


produces a display file:
Produces a display file:
Pathname\program-name+date+time+255.txt
 
pathname\program-date-time.255
 
  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.prt


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

Revision as of 18:00, 15 January 2019

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

( 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.