Obtaining a Count of Data Records - mfx - 3.1

Syncsort™ MFX Programmers Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ software
Product
Syncsort™ MFX > MFX
Version
3.1
ft:locale
en-US
Product name
Syncsort™ MFX
ft:title
Syncsort™ MFX Programmers Guide
Copyright
2024
First publish date
2010
ft:lastEdition
2025-02-20
ft:lastPublication
2025-02-20T09:24:15.574000

Example: Marketing wants a count of the total number of customers with outstanding payments included in the summary of its outstanding invoices report.

To get this record count and print it as part of the report summary, the following is coded.

Figure 1. JCL and Required Control Statements

The following figure shows the trailer containing the record count.

Figure 2. Report Trailer Containing Record Count

Explanation: Since each record in the report represents an individual customer, coding the COUNT entry in the TRAILER1 will provide the total number of customers with outstanding payments. This TRAILER1 produces a report trailer, or summary, that constitutes the final page of a report. It will print on the 21st line of the page (20/) and begin printing the literal string 'NUMBER OF CUSTOMERS WITH OUTSTANDING PAYMENTS: ' in column 40.