       IDENTIFICATION DIVISION.
       PROGRAM-ID. accounts.
       AUTHOR.  bbarr/mkirschen/jrodgers
       DATE-WRITTEN. 2002/10/28 PM 02:15.
       REMARKS.    Initial Version 6.0
           [This program creates a file that can be used to demonstrate SQL syntax 
           supported by AcuODBC:  SELECT, INSERT, DELETE, and UPDATE.

           An AcuODBC Data Source Name needs to be set up using ODBC Manager.
           The program needs to be compiled with an -Fa option 
           pointing to path for XFD creation.  The program needs a .cfg file
           to point to the file directory when creating or adding to the
           data file.]

       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SPECIAL-NAMES.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT jr-file
              ASSIGN TO "accounts"
              ORGANIZATION IS INDEXED
              ACCESS IS DYNAMIC
              RECORD KEY IS patient-id
              FILE STATUS IS jr-file-status.

       DATA DIVISION.
       FILE SECTION.
       FD  jr-file.
       01  jr-record.
           05 patient-id                      pic 9(5).
           05 months.
       	       10  January                    pic 9(6)v9(2).	
               10  February                   pic 9(6)v9(2).
               10  March                      pic 9(6)v9(2).
               10  April	              pic 9(6)v9(2).
               10  May                        pic 9(6)v9(2).
      	       10  June			      pic 9(6)v9(2).

       WORKING-STORAGE SECTION.
           
       01  jr-file-status                  pic xx.

       PROCEDURE DIVISION.

       MAIN-LOGIC.
       
           open output jr-file.
           move "00001" to patient-id.
           move 25 to January.	
           move 0 to February.
           move 35.75 to March.
           move 0 to April.
           move 60 to May.
           move 0 to June.
	     write jr-record.

           move "00002" to patient-id.
           move 500 to January.	
           move 60 to February.
           move 55 to March.
           move 105.55 to April.
           move 0 to May.
           move 0 to June.
	     write jr-record.

           move "00018" to patient-id.
           move 0 to January.
           move 0 to February.
           move 0 to March.
           move 49.50 to April.
           move 0 to May.
           move 13.25 to June.
             write jr-record.

           move "00054" to patient-id.
           move 725 to January.
           move 133.45 to February.
           move 28 to March.
           move 28 to April.
           move 28 to May.
           move 28 to June.
             write jr-record.

           move "00072" to patient-id.
           move 13.45 to January.
           move 13.45 to February.
           move 79.90 to March.
           move 13.45 to April.
           move 13.45 to May.
           move 13.45 to June.


           move "00102" to patient-id.
           move 10 to January.	
           move 15 to February.
           move 25 to March.
           move 20.50 to April.
           move 5 to May.
           move 200 to June.
	     write jr-record.

           move "00328" to patient-id.
           move 60.50 to January.
           move 15.25 to February.
	   move 28.70 to March.
           move 0 to April.
           move 0 to May.
           move 0 to June.
             write jr-record.

           move "00480" to patient-id.
           move 98.25 to January.
           move 0 to February.
           move 0 to March.
           move 0 to April.
           move 0 to May.
           move 0 to June.
             write jr-record.
   
           move "00503" to patient-id.
           move 5.75 to January.	
           move 5 to February.
           move 5 to March.
           move 75 to April.
           move 90 to May.
           move 0 to June.
	     write jr-record.

           move "00801" to patient-id.
           move 10 to January.	
           move 10 to February.
           move 10 to March.
           move 10 to April.
           move 25.75 to May.
           move 10 to June.
	     write jr-record.

           move "00802" to patient-id.
           move 48.24 to January.
           move 17.50 to February.
           move 0 to March.
           move 0 to April.
           move 0 to May.
           move 0 to June.
             write jr-record.
           

	     close jr-file.                 
           Exit Program.
           Stop Run.

