Example: The departmental sales report’s final page will be a summary containing both the total for the sales this period and the total for the sales to date. The trailer will begin on the 21st line of the page and each total will have an identifying label.
The following figure shows the trailer that is generated by the above TRAILER1 parameter.
Explanation: The TRAILER1 parameter produces a report trailer or summary that constitutes the final page of a report. Unless otherwise specified, it begins on the first line of the page. This TRAILER1’s initial number-slash(n/) entry, 20/, directs the printer to forward space 20 blank lines before printing. The next entry, a number-colon (c:) entry, is used to center the literal string that follows it by having the string of characters begin printing in the appropriate column. It specifies column 40 as the beginning position for the literal string 'SALES THIS PERIOD:' that labels the numeric data following it. This TRAILER’s other number-colon plus literal-string entry functions the same way.
The two TOT entries, TOT=(....), generate the trailer’s totals. These entries specify the numeric data used and its format. Thus the four bytes of packed-decimal data that begin in byte 24 (24,4,PD) and the four bytes that begin in byte 28 (28,4,PD) of the input record are converted to printable format. This data is then edited by the EDIT pattern ($II,IIT.TT), which suppresses the printing of leading zeros and inserts a floating dollar sign as well as a necessary comma and decimal point. The pattern uses an I to indicate those zeros in the total that should not be printed and a T to indicate those that should.