sysout2pdf options can be used to control the name, content,
and formatting of the PDF output. The order of the options is not
significant but infile must be specified after
any options. If the mailto option is used you can specify the headers
and body text for the generated email message.
sysout2pdf[-body email_body_text]
[-date prefix|suffix]
[-dateformat string]
[-filter file]
[-fold width]
[-from address]
[-mailin]
[-mailto address]
[-nocc]
[-nocleanup]
[-nulltospace]
[-param name value]
[-pdf file]
[-rmin]
[-rmpdf]
[-style file]
[-subject email_subject]
infile
Options
- -body email_body_text
- Body text of the email (currently supports plain text only).
- -date prefix|suffix
- Prefixes or suffixes the generated PDF file name with the current
date. Does not apply if you specify a -pdf option (to explicitly specify
the PDF file path).
- -dateformat string
- The date format string used by the -date option. For allowed values,
see the z/OS® UNIX date command.
Default prefix
date format string:
"+%Y-%m-%d-"
Default suffix
date format string:
"+-%Y-%m-%d"
For example,
if you specify -date suffix, and the input file is myreport.txt, and
today is 30 November 2010, then the PDF will be named myreport-2010-11-30.pdf
- -filter file
- A program (such as a shell script) that reads the input file from
stdin, edits it, and then writes it to stdout.
Use this option
to customize sysout2pdf for particular reports: for example, to highlight
specific string patterns in different colors or to add bookmarks.
See the examples in the filters directory.
Initially, sysout2pdf
treats the value of this argument as a file path; however, if the
file path does not exist, sysout2pdf treats the value as the name
of a file in the filters directory next to the sysout2pdf shell script.
For
example, if the sysout2pdf shell script is in the directory /bin/sysout2pdf,
then the following argument:
-filter cpa-wait
has
the same effect as:
-filter /bin/sysout2pdf/filters/cpa-wait
- -fold width
- If the z/OS batch application
produces a report with no record delimiters, use this argument to
insert a newline character at the end of each record. (Records must
be fixed-length.)
- -from address
- The address that you want to appear in the From field of the email.
Default is sysout2pdf.
- -mailin
- Attach the input file (the original batch report) to the email,
with ISO 8859-1 character encoding (not EBCDIC), and with each line
delimited by a carriage return/line feed pair of characters (that
is, the default Microsoft Windows \r\n, not just the single-character UNIX \n "newline"). Unless you
specify the -nocc option, sysout2pdf removes the first column from
the input file before attaching it.
- -mailto address
- One or more email addresses to which you want to send the PDF.
Separate multiple addresses with commas. The PDF is sent as a base64-encoded
MIME attachment.
- -nocc
- Specify this option for batch reports that do not contain carriage
control characters in the first byte of each record.
- -nocleanup
- Do not remove temporary file after completing. sysout2pdf creates
the temporary file temp*.xml in the same directory as the output PDF
file.
- -nulltospace
- Convert null (\0) characters in the report to spaces. Applications
that produce reports containing null characters are typically considered
ill-behaved. Try using the -nulltospace option if you get the following
error:
FSUM9201 input file "[standard input]" is binary
- -param name value
- Parameter to be passed through to the XSLT stylesheet. You can
specify multiple param options, each specifying a parameter name and
value. The parameter names that you can specify depends on the XSLT
stylesheet that you use. The default XSLT stylesheet supports the
following parameters:
Name |
Default value |
font-size |
9pt |
line-height |
11pt |
page-height |
8.5in |
page-width |
11in |
margin-top |
0.5in |
margin-bottom |
0.5in |
margin-left |
0.5in |
margin-right |
0.5in |
Tip: To specify a different standard page
size, instead of specifying:
-param page-width 210mm
-param page-height 297mm
use the -style option to achieve
the same effect:
-style a4-portrait
- -pdf file
- Output PDF file path. If omitted, sysout2pdf creates a PDF in
the same directory as the input batch report, and with the same base
file name. For example, if the batch report file name is batchreport.txt,
the PDF will be called batchreport.pdf.
- -rmin
- Remove input file after creating the PDF file.
- -rmpdf
- Remove PDF file after completion (intended for use with the -mailto
option).
- -style file
- A custom XSLT stylesheet to use instead of the default file (styles/default.xsl).
Use this option to customize the appearance of your PDF.
Initially,
sysout2pdf treats the value of this argument as a file path; however,
if the file path does not exist, sysout2pdf treats the value as the
name of an XSLT stylesheet file, without its .xsl extension, in the
styles directory next to the sysout2pdf shell script.
For example,
if the sysout2pdf shell script is in the directory /bin/sysout2pdf,
then the following argument:
-style a4-portrait
has
the same effect as:
-style /bin/sysout2pdf/styles/a4-portrait.xsl
Styles
supplied with sysout2pdf include:
- default
- letter-landscape (identical to default)
- letter-portrait
- a4-landscape
- a4-portrait
- -subject email_subject
- Subject line of the email.
- infile
- File path of the batch report. This is the only required argument.
It must be the last argument specified.