*PROCEDURAL COBOL MAIN PROGRAM.. SUB ON SECOND PAGE *************************************************** * Room Rental System * W. Price 6/18/96 ROOM02PR.CBL * * The program ROOM01PR has been split into two * parts: this calling program & the accompanying * subprogram. Actions of the program/subprogram * pair are identical to those of ROOM01PR. The * room data is stored in the subprogram. Access * to it is provided by the procedural statements * of the subprogram. *************************************************** Identification Division. Program-ID. Room02Program. * ROOM02PR.CBL Data Division. Working-Storage Section. 01 room-prices. 10 std-config-price pic 9(03). 10 spec-config-price pic 9(03). 01 apply-discount-sw pic X(01). 88 apply-discount value "Y" "y". Procedure Division. 000-process-room-data. Perform 200-get-user-request Call "room02su" Using apply-discount-sw room-prices Perform 300-display-room-prices Stop run . 200-get-user-request. Display " " Display "Do you want discounted price ? " with no advancing Accept apply-discount-sw . 300-display-room-prices. Display " " Display "Standard configuration price: " std-config-price Display "Special configuration price: " spec-config-price .