6.3.2 Syntax

Descriptive

PRTPUB inputfile,outputfile [,[sizefile] ,[
interval] ,[taillines]





,[CRLF] ,[HTML] ,[NOPB]]

Diagram

Êʬ¬¬ PRTPUB ¬¬¬ inpufile,outpufile ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ







¬ , ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬¬¬¬¬¬¬¬Ê








sizefile ¬¬¬¯

ʬ¬¬ , ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬ , ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬Ê


interval ¬¬¬¯

taillines ¬¬¬¯

ʬ¬¬ , ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬ , ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬Ê


CLRF ¬¬¬¯

HTML ¬¬¬¯

ʬ¬¬ , ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ


NOPB ¬¬¬¯

6.3.3 Parameter

The program takes a single long argument which must not contain spaces. If the file paths (on Windows)
contain spaces then the entire argument must be enclosed in quotes. No spaces are allowed anywhere
else, whether or not quotes are used. If quotes are used then they are only permitted as the first and last
characters of the argument string.

The argument is divided into sub parameter separated by commas. All parameter are positional, if they
are omitted a comma must mark their place.

inputfile

The file containing the emulated mainframe output.

outputfile

The file to which the result is to be published.

sizefile

The file containing the input file's size at the time of the previous run. If specified,
this file is used to track the size of the input file, only publishing when it changes.
The file will generally not exist the first time it is specified. In that case, the pub-
lishing is done and the file is written for use in subsequent runs. The file contains a
number in binary form. It cannot be directly edited. If this parameter is not specified
then the publishing is always done regardless of the file's size.

interval

The polling interval for use with the size file. If this argument is specified it must be
a positive integer and it indicates a number of seconds between file size checks. In
this mode if the input file's size has not changed since the last invocation (based on
the size stored in the size file), the program goes into polling mode where it con-

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.

taillines

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.

CRLF

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

HTML

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

NOPB

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.

D:\HERCUELS\PRTPUB D:\MVS\PRT\PRT1.TXT,D:\MVS\PRT\PRT1.DOC,,,,CRLF,,NOPB

Previous Page Next Page