How sysout2pdf works

sysout2pdf is a z/OS UNIX shell script. sysout2pdf reformats a z/OS batch report as XML and then uses Apache FOP (an open-source tool) to output the report as PDF.

sysout2pdf performs the following steps:

  1. If requested (by the -fold option), splits the input file into multiple lines by inserting newline characters at regular intervals. This is only necessary if the batch report does not contain end-of-record delimiters (in which case, the resulting z/OS UNIX file consists of a single, and possibly very long, line).
  2. Replaces XML-significant characters (< > &) with references to the equivalent XML entities (lt gt amp).
  3. Unless the -nocc ("no carriage control") option was specified, treats the first column of each line as a carriage-control character. Converts some, ignores others (such as overstrike), and then removes the first column. For example, replaces "new page" characters except for the first with the XML tags:
    </section><section>
    This means "end the current section, and then start another."
  4. Applies a filter, if specified (by the -filter option).
  5. Adds the following XML to the start of the file:
    <?xml version="1.0"?>" 
    <report><section>
  6. Adds the following XML to the end of the file:
    </section></report>
  7. Calls FOP to transform the XML into XSL-FO (a particular type of XML) according to the XSLT stylesheet, and then convert the XSL-FO to PDF.
  8. If requested (by the -mailto option), sends an email containing the PDF.

Concept Concept

Feedback


Timestamp icon Last updated: Thursday, 7 November 2013


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic//common/cpa99sys2p-how.htm