This topic shows examples of using sysout2pdf to create
and send PDF output from batch reports. Each example is split over
multiple lines for readability and can be issued in this way from
a batch job. To run an example directly in a UNIX command shell, you
must enter the command on a single line. For other examples, see members
CPASPSM1, CPASPSM2, and CPASPWT1 in the sample library SCPASAMP.
Simplest case: create a PDF file
This example
creates the PDF file /u/myid/report.pdf (with a landscape-oriented,
letter-sized page, and 9-point text):
sysout2pdf
"/u/myid/report.txt"
Create a PDF file with a date-stamped file name suffix
This
example creates the PDF file /u/myid/report-2010-30-11.pdf (assuming
today is 30 November 2010):
sysout2pdf
-date suffix
"/u/myid/report.txt"
Create a PDF file with a wide page size
This
example creates a PDF file with a page size that is twice as wide
as a landscape-oriented Letter-sized page:
sysout2pdf
-param page-width 22in
"/u/myid/report.txt"
Create a PDF file using a filter
This example
creates a PDF file using a filter that is specifically designed for
the CICS PA wait analysis report. This filter creates bookmarks to
each transaction code in the Wait Analysis report.
sysout2pdf
-filter cpa-wait
"/u/myid/wait0001.txt"
Send the PDF file using email
This
example creates the PDF file /u/myid/report.pdf, and then sends report.pdf
by email to user@example.com:
sysout2pdf
-mailto user@example.com
"/u/myid/report.txt"
Send the PDF file and input file using email, and
then delete them
This example creates the PDF file /u/myid/report.pdf,
sends it and the input file by email (-mailin) to user@example.com,
and then removes (deletes) both the PDF file (-rmpdf) and the input
file (-rmin). Use -rmin and -rmpdf when you only want the report by
email, and you do not want to leave any files on z/OS UNIX.
sysout2pdf
-mailto user@example.com
-mailin
-rmin
-rmpdf
"/u/myid/report.txt"
Send an email with custom subject line, from address,
and body text
This example sends an email with the subject
line "My CICS performance report", the from address "CICS PA", and
the body text "PDF and plain-text versions attached".
sysout2pdf
-mailto user@example.com
-subject "My CICS performance report"
-from "CICS PA"
-body "PDF and plain-text versions attached"
-rmin
-rmpdf
"/u/myid/report.txt"