Descriptionpclp -Ooverlay -Tmode [options] < [printfile]
pcr will process a formatted data records into page images under the control of a "report template" which is written in PI syntax. The mode parameter determines the output driver which will be employed. The report template describes the page constructs independently of the target device.Datafile Directives
The pcr program is written in PI and uses pcf as the program interpreter.Therefore all the options which are available to pcf also apply to pcr.
The datafile contains directives and data. The directives usually name the report template which will be applied. Other directives identify header and footer records, and precede any other data records which make up the body of the report.
The following directives may appear in the data file;
.RE T.templates Template definition .RE H.header Header section .RE F.footer Footer section .RE R.record Record .RE PAGEBREAK Page break .PA Page break, same as .RE PAGEBREAK
For a full explanation of these, refer to the Report Writer Tutorial and Worked Examples.Example
pcr can operate in a Unix command pipe line. It is normally called in this fashion to generate reports. Data is read from standard input and the compiled report is written to standard output. pcr would normally be called with the "-T" option to invoke the appropriate printer driver although the default mode is "PCL" to suit laser printers, e.g.;
Options
$ cd $Utools/Utools
$ bin/pcr -TPCL < demo/pcr_example1 | lpr -Plp
Most of the options available to pcf apply to pcr as well, i.e.;
-i fileStandard input will be redirected from the named file
-o fileStandard output will be redirected to the named file
-E fileStandard error will be redirected to the named file
-T modeOpen output driver library file mode. e.g. -TPCL will open the output driver $Utools/Utools/include/PCL.pi. and the entry and exit functions, PCL_mode_begin() and PCL_mode_end() will be called.
-v var=valPredefine global variable var with the value of constant val.
-D flagEnable debugging level. See the table described for pcf.
The following additional options may be given to pcr;Global Variables
-t templateUse report template (if data file doesn't include ".RET" directive).
-h headerReport section name to use for page header
-f footerReport section name to use for page footer
-r recordDefault report section name to be used for each record.
-C copiesGenerate the nominated number of copies of the report.
The following variables, in addition to those declared by pcf, are declared with global scope by pcr;
Variable
Description
Pass Report generation progress, 1st or 2nd pass. Page Current page number in report TotalPages Total number of pages in report. Copy Current copy number (of TotalCopies) TotalCopies Total number of copies (value of "-C" command line option)
For a full explanation of these, refer to the Report Writer Tutorial and Worked Examples.
pcf - Print Control Forms Compiler and Program Interpreter (PI).