Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in cobol create this program Book ISBN: 978-0789557032 or 0789557037 Customer Exercise purchases Selection Report Program Purpose: To practice using the COBOL SORT statement and
in cobol create this program
Book ISBN: 978-0789557032 or 0789557037
Customer Exercise purchases Selection Report Program Purpose: To practice using the COBOL SORT statement and record selection processing in the creation of a COBOL program that produces a Customer Purchases Selection Report Problem: Write a program that displays specific Customer Purchase records for the ABC Department Store. For each report, enter selection criteria via the keyboard, display only those records that satisty the entered criteria, and list the records in dcsccnding sequence by balance. Spaces entered for a selection criterion mean that the criterion is to be ignored. Use the following selection criteria Field Desarlption Validation Date of Purchase Spaces or an eight-character numeric entry in the format of MMDDyyy: the month (MM) should be a value in the range of l to 12; the day (DD) should be a value in the range of I to 3 the year (yyy) should be greater than 1999, List all records with a Date of Purchase greater than or equal to the entered date. Be Careful! Dates should be compared in yyyyMMDD format Account Number Spaces or a six-character numeric entry in the range of 10000 to 500000. List all records with an Account Number greater than or equal to the one entered tem Purchased No validation required. When not spaces, list purchases of just this item Minimum Quantity all records Spaces or a one-character numeric entry greater than zero. List with a quantity greater than or equal to the one entered Maximum Quantity Spaces or a one-character n umer entry greater than zero. List all records with a quantity less than or equal to the one entered all Spaces or a six-character numeric entry treated as PIC 9(4)V99. List Minimum Balance records with a balance greater than or equal to the one entered. Be Careful! For each record displayed, show the date of purchase, account number, cus purchased, quantity tomer name, item purchased, and ba ance. Display the current date and me on every page. Time should be shown in AM/PM format Number each page and start each report with page 1. At the end of each report, print the total number of records processed, total number of records listed and total balance. Save this program as EX6-2.CBL input Data: Use the Customer file sted in Appendix A as input. This e is named CUSTOMER DAT 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 ength Attribute Date of Purchase 8 Numeric, PIC 9(8) Account Number 9-14 Alphanumeric Customer Name 5-34 Alphanumeric 20 Item Purchased 35-54 Alphanumeric 20 Quantity Purchased 55 Numeric PIC 9 Balance 56-6 6 Nu eric, S9(4)V99 filler 62-74 13 Alphanumeric Record Length 74 Customer Exercise purchases Selection Report Program Purpose: To practice using the COBOL SORT statement and record selection processing in the creation of a COBOL program that produces a Customer Purchases Selection Report Problem: Write a program that displays specific Customer Purchase records for the ABC Department Store. For each report, enter selection criteria via the keyboard, display only those records that satisty the entered criteria, and list the records in dcsccnding sequence by balance. Spaces entered for a selection criterion mean that the criterion is to be ignored. Use the following selection criteria Field Desarlption Validation Date of Purchase Spaces or an eight-character numeric entry in the format of MMDDyyy: the month (MM) should be a value in the range of l to 12; the day (DD) should be a value in the range of I to 3 the year (yyy) should be greater than 1999, List all records with a Date of Purchase greater than or equal to the entered date. Be Careful! Dates should be compared in yyyyMMDD format Account Number Spaces or a six-character numeric entry in the range of 10000 to 500000. List all records with an Account Number greater than or equal to the one entered tem Purchased No validation required. When not spaces, list purchases of just this item Minimum Quantity all records Spaces or a one-character numeric entry greater than zero. List with a quantity greater than or equal to the one entered Maximum Quantity Spaces or a one-character n umer entry greater than zero. List all records with a quantity less than or equal to the one entered all Spaces or a six-character numeric entry treated as PIC 9(4)V99. List Minimum Balance records with a balance greater than or equal to the one entered. Be Careful! For each record displayed, show the date of purchase, account number, cus purchased, quantity tomer name, item purchased, and ba ance. Display the current date and me on every page. Time should be shown in AM/PM format Number each page and start each report with page 1. At the end of each report, print the total number of records processed, total number of records listed and total balance. Save this program as EX6-2.CBL input Data: Use the Customer file sted in Appendix A as input. This e is named CUSTOMER DAT 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 ength Attribute Date of Purchase 8 Numeric, PIC 9(8) Account Number 9-14 Alphanumeric Customer Name 5-34 Alphanumeric 20 Item Purchased 35-54 Alphanumeric 20 Quantity Purchased 55 Numeric PIC 9 Balance 56-6 6 Nu eric, S9(4)V99 filler 62-74 13 Alphanumeric Record Length 74Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started