tinually checks the size every interval seconds until a change is detected and then
continues processing.

If this argument is not given the default behaviour is to return with a return code of
4 when the input file's size has not changed. Using this argument can improve the
efficiency of simple polling in cases where nothing else is to be done on each pol-
ling interval. This is because it does not require the program to be invoked, argu-
ments to be processed etc., on each polling interval. If no size file is specified this
argument is checked for syntax but otherwise ignored.


The number of lines that should be published. If the input file contains more than
the given number of lines then only the last <tail lines> lines are published. If this
parameter is not specified the entire file is published. This number gives the num-
ber of printed lines published, including page separators. Note that the number may
be off by one in either direction. If the final character of the file is a form feed then a
trailing page separator is always output, which can add an extra line in some cases.

By the same token if the tail is broken on a form feed character then the entire form
feed, which counts as two line breaks, is skipped, resulting in one fewer line of out-
put. If this argument is 'ONLY' (in all caps) then the size file must also be specified.
In that case the program translates only the part of the printer file that is new since
the prior invocation, unless the new size is smaller than the old size, in which case
the whole file is translated.

The purpose of this feature is to allow this program to be used as a sort of spool
writer in conjunction with scripts that do something interesting with the incremental
output, such as print it to a printer. In this mode empty output files are not
produced. If the output is zero length and ONLY is specified, the program
terminates with a return code of 4.


If specified then all linefeeds in the source file are translated to CR/LF pairs and
CR/LF is used as the terminator for the page break line. If not specified no linefeed
translation is done and the page break line is terminated with a newline character.
This parameter is case sensitive (must be uppercase).


If specified then HTML tags are added to the published output file. The file begins
with <HTML><PRE> and ends with </PRE></HTML>. This parameter is case sen-
sitive (must be uppercase).


If specified then form feed characters are not translated to page break lines. This is
useful primarily for processing the published data after it is published, e.g. sending
it to a real printer, etc. This argument must be in upper case. When NOPB is speci-
fied form feed characters are still bracketed with newlines to keep the maximum
output record size consistent.

6.3.4 Examples

Example 1:

Publish the print output from print file PRT1.TXT and create a Word document named PRT1.DOC with
carriage return/line feeds and do not translate form feed characters to page break lines.


Example 2:

Publish the print output from print file PRT2.TXT and create a HTML document named PRT2.HTML with
carriage return/line feeds.


Example 3:

Publish the print output from print file PRT00E.TXT and create a HTML file called PUBL.HTML with
carriage return / line feeds. The input file's size at the time of the previous run should be kept in file
PRT00E.SIZ. The polling interval to check the file size is 10 seconds. The maximum number of lines that
should be published is 1000.

@echo off


prtpub prt00e.txt,publ.html,prt00e.siz,10,1000,CRLF,HTML

if errorlevel 1 goto NOTDONE


goto LOOP



goto LOOP

6.3.5 Sample Utility Output

With the exception of error messages (if any) the utility does not produce any screen output.

Previous Page Next Page