Question: Purpose: To practice using edit patterns and the SCREEN SECTION in creating a COBOL program that produces a Customer Purchases report. Problem: Write a program

Purpose: To practice using edit patterns and the SCREEN SECTION in creating a COBOL program that produces a
Customer Purchases report.
Problem: Write a program that displays a Customer Purchases Report for the ABC Department Store. Use the
SCREEN SECTION for output definitions. Display the account number, customer name, balance, purchases, and
credit limit on each detail line. Edit the customer balance and purchases using floating dollar signs. Use the credit
symbol (CR) at the end of the edit pattern for the balance field. Zero suppress the credit limit field. Save this
program as EX3-2.CBL.
Input Data: Use the Customer file listed in Appendix A as input. This file is named CUSTOMER.DAT and is among the files on the Data Disk. See the inside back cover of this book for instructions for downloading the Data Disk or see your instructor. Customer records have the following layout:
Field Description
Position
Length
Attribute
filler
1-8
8
Alphanumeric
Account Number
9-14
6
Alphanumeric
Customer Name
15-34
20
Alphanumeric
filler
35-55
21
Alphanumeric
Balance
56-61
6
Numeric, S9(4)V99
Purchases
62-67
6
Numeric, 9(4)V99
Credit Limit
68-72
5
Numeric
filler
73-74
2
Alphanumeric
Record Length
74
Output Results: Output consists of the Customer Purchases Report that displays the account number, customer name, balance, purchases, and credit limit for each customer. Single-space detail lines. Count and display the number of customers processed. The report should have a format similar to the following:
DATE: Z9/99/9999
ABC DEPARTMENT STORE
CUSTOMER PURCHASES REPORT
PAGE ZZ9
ACCOUNT NUMBER
CUSTOMER NAME
XXXXXX
XXXXXXXXXXXXXXXXXXXX
XXXXXX XXXXXXXXXXXXXXXXXXXX
BALANCE
-1
$$,5$5.99CR
PURCHASES
$$, $55.99
SS, $$$.99
CREDIT LIMIT
Z,229.99
2,229.99
TOTAL NUMBER OF RECORDS DISPLAYED = ZZZZ9
END OF REPORT
 Purpose: To practice using edit patterns and the SCREEN SECTION in

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!