identification division. program-id. Program1. environment division. input-output section. select item-master assign to "C:\temp\item-master.txt" organization is line sequential. select item-output assign to "C:\temp\item-record.txt" organization is line sequential. configuration section. data division. file section. fd item-master. 01 item-file. 05 item-no pic x(5). 05 item-descrip pic x(20). 05 item-cost pic 999v99. fd item-output. 01 item-record. 05 pic x(37). 05 year pic z9. 05 pic x(13). 05 inf-rate pic xx. 05 pic x. 05 pic x(20). 05 inf-cost pic zz9.99. 05 pic x(49). working-storage section. 01 top-heading. 05 pic x(47) value spaces. 05 pic x(31) value "I N F L A T I O N R E P O R T". 05 pic x(12) value spaces. 05 c-day pic xx/. 05 c-month pic xx/. 05 c-year pic xxxx. 05 pic x(22) value spaces. 05 pic x(5) value "PAGE ". 05 page-num pic 999 value 1. 01 temp-date. 05 temp-year pic xxxx. 05 temp-month pic xx. 05 temp-day pic xx. 01 item-no-heading. 05 pic x(4) value spaces. 05 pic x(13) value "ITEM NUMBER: ". 05 item-no-out pic x(5). 05 pic x(108) value spaces. 01 item-descrip-heading. 05 pic x(4) value spaces. 05 pic x(19) value "ITEM DESCRIPTION: ". 05 item-descrip-out pic x(20). 05 pic x(87) value spaces. 01 item-cost-heading. 05 pic x(4) value spaces. 05 pic x(12) value "ITEM COST: ". 05 item-cost-out pic $$$$.99. 05 pic x(107) value spaces. 01 record-heading. 05 pic x(36) value spaces. 05 pic x(4) value "YEAR". 05 pic x(5) value spaces. 05 pic x(14) value "INFLATION RATE". 05 pic x(5) value spaces. 05 pic x(24) value "ITEM COST WITH INFLATION". 05 pic x(42) value spaces. 01 eof pic xxx value "YES". 01 year-num pic 99 value 1. 01 rec-count pic 99 value 1. procedure division. 100-main. open input item-master output item-output perform 150-get-date perform until eof = "NO" read item-master at end move "NO" to eof not at end perform 200-write-headings perform 250-write-record 10 times end-read end-perform close item-master item-output goback. 150-get-date. move function current-date to temp-date move temp-day to c-day move temp-month to c-month move temp-year to c-year. 200-write-headings. move top-heading to item-record if rec-count > 5 or rec-count = 1 write item-record after advancing page add 1 to page-num end-if move item-no to item-no-out move item-no-heading to item-record write item-record after advancing 2 lines. move item-descrip to item-descrip-out move item-descrip-heading to item-record write item-record move item-cost to item-cost-out move item-cost-heading to item-record write item-record. move record-heading to item-record write item-record after advancing 1 line add 1 to rec-count if rec-count > 5 move 1 to rec-count end-if. 250-write-record. move spaces to item-record move year-num to year if year-num <= 5 move "8%" to inf-rate compute item-cost rounded = item-cost * 1.08 move item-cost to inf-cost write item-record else move "6%" to inf-rate compute item-cost rounded = item-cost * 1.06 move item-cost to inf-cost write item-record end-if add 1 to year-num if year-num > 10 move 1 to year-num end-if. end program Program1.