This image shows the organization of the major procedures in the
carpool application. The following pseudocode presents the same
information, but omits file handling error routines. Paragraph
000-DO-MAIN-LOGIC describes the main control flow. Subsequent
paragraphs describe the major subroutines.
Main routine 000-DO-MAIN-LOGIC:
- Perform 050-create-VSAM-master-file
- Perform 100-Initialize-paragraph
- Perform until Update-transaction-eof
- Perform 200-Edit-update-transaction
- If no-errors perform 300-Update-commuter-record
- Else perform 400-Print-transaction-errors
- End-if
- End-perform
- Perform 700-Find-home-junction.
- Perform 800-Find-work-junction.
- Perform 1100-Print-headings.
- Perform 1200-Print-data.
- Stop run.
Subroutine 050-create-VSAM-master-file:
- Open output VSAM COMMUTER-FILE, write dummy record, close
file
- Open I-O VSAM COMMUTER-FILE, delete dummy record, close
file
Subroutine 100-Initialize-paragraph:
- Open files
- Move current date and time to report heading, save current
date
- Load location table.
Subroutine 200-Edit-update-transaction:
- Validate identical items for ADD, REPLACE, and DELETE
transactions
- Check against COMMUTER MASTER file for match;
- Validate remaining items for ADD and REPLACE transactions.
Subroutine 300-Update-commuter-master-record:
- Update commuter master file, print old record if any, print new
record
Subroutine 400-Print-transaction-errors:
- Print invalid transaction and all detected errors
Subroutine 700-Find-home-junction:
- Search table for code/name match
Subroutine 800-Find-work-junction:
- Search table for code/name match
Subroutine 1100-Print-headings:
- Open the print file and print headings
Subroutine 1200-Print-data:
- Perform 1210-get-miles-time
- Perform 1220-store-miles-time
- Perform 1230-print-sub-data
- Perform 1240-compute-summary.
You can see the sample programs on the product installation tape
to learn about other procedures in the carpool application.
End of image description.