Hello, This is Kevin. Welcome to the first part of lesson on preparing reports. During the first decade of COBOL, most output went to printers. Today, reports usually end up as a PDF, thanks to Adobe. The language of COBOL uses words like paper, print, and printer. We're going to use those words in this lesson, even if we know that the destiny of many reports is likely to be PDF. During this lesson, we're going to list three types of reports, list seven components of a report, learn how and when to write control break logic, and learn how STRING and UNSTRING manipulate data. What is a report? It's a document with clear purpose to particular audience. It's a pictorial representation of data. It has columns and rows with instructions and guidelines and it has different categories, such as levels and groups of information. There are three kinds. Detail reports, if you look at the top, exception reports, and summary reports. Now, a detailed report is going to produce one or more lines for each one of the records. An exception report takes a look at the records and is looking for something specific, such as what customers are more than 30 days late on their payments. Then we have a summary report which produces a single line for each different category of input records that have been sorted. We have some examples here. At the top, the main paragraph reads a record and performs detail, process and repeats until there's no more records. On the bottom, it responds when line counter is greater than 55 and performs the heading. On the top, we see the control break writing the record output and resetting the counters. Waiting for us down at the bottom is the headings paragraph, report components are responsible for printing when needed. On the screen you're going to see the word print oftentimes. The report heading only prints on the first page, usually with a title, date, and other information. The page heading will print at top of each page with, you guessed it, a page number. The control heading prints just after a control break occurs, then it is followed by detail lines that print detail information. Now footings are optional. They're not always used, but there's three of them. The first one is the control footing, which has one or more lines that print after a control break, page footings one or more lines to print at the bottom of each page prior to skipping to the top of the new page, and then there's the report footing one or more lines to print at the end of the report. In previous sessions, you learned most of the items in the top three lines. We're not going to go over them again, but they go from switches and counters to report components. They'll be used to develop reports. Headings and footers are created in the working storage section. The seven headers, lines, and footers are listed at the bottom of the screen. Now we have a new topic, something called STRING and something called UNSTRING. They behave differently than our good friend, move. What they do is they manipulate text. STRING combines alphabetic fields left to right, and brings them into one single field. Some of the things that go with STRING are with pointer, which specifies starting the position for insertion into the destination STRING. When STRING is finished, it indicates where the next position to be filled is going to be located. On overflow handles logic to be performed when the receiving field is not big enough to accommodate the entire string. In the example, we start by filling whole name with spaces. Then the first four bytes of John are combined with a space, then with the 25 bytes of last name. Now UNSTRING manipulates data just like STRING does, but what it does is it parses a field from left to right into two or more receiving fields until a delimiter is encountered in the source field or the destination string runs out of room. In this UNSTRING example, the program will ask a person to type in their name in three parts with a comma separating each. Then the UNSTRING will separate each name and store each one in a separate field. We have a last name in one place, the first name and another, and middle initial in another still. Well, here we are hopefully, able to list three types of reports, list seven components of a report, write control break processing logic, and use the STRING or the UNSTRING to manipulate some of your data. See you next time.