この図では、相乗り通勤アプリケーション内の主要なプロシージャーの
構成が示されています。
次の疑似コードでは同じ情報が示されますが、ファイル処理エラー・ルーチンは
省略します。
段落 000-DO-MAIN-LOGIC は、メイン制御フローを記述します。
後続の段落は、主要なサブルーチンを記述します。
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.
製品インストール・テープにあるサンプル・プログラムを確認して、
相乗り通勤アプリケーション内の他のプロシージャーについて理解することができます。
図の説明の終わり。