| 
 | 
Here is part of my code:
This is what I have in the Input-Output Section:
SELECT STUDENT-HISTORY-FILE
             ASSIGN TO DATABASE-STCHSL0
             ORGANIZATION  INDEXED
             ACCESS IS DYNAMIC
             RECORD KEY IS EXTERNALLY-DESCRIBED-KEY
             FILE STATUS IS DBSTATUS.Data Section:
OPEN I-O STUDENT-HISTORY-FILE.
          IF DBSTATUS NOT = ZERO,
             DISPLAY 'UNABLE TO ACCESS STCHSLT-FILE; '
                  'STATUS IS ' DBSTATUS
                  PERFORM 999-STOP-RUN.Starting the file:
MOVE 0 TO R9NMID
          MOVE 'COMP' TO R9CQAA.
          MOVE 'XX' TO R9CMAA.
          MOVE 2 TO R9KHAA.
          MOVE 'MPRQ' TO R9B1AA.
          MOVE '171' TO R9B2AA.
          START STUDENT-HISTORY-FILE KEY NOT LESS THAN
                     EXTERNALLY-DESCRIBED-KEY
                     INVALID KEY
                        CONTINUE.
          IF DBSTATUS NOT = ZERO,
             DISPLAY 'UNABLE TO ACCESS STCHSLT-FILE; '
                  'STATUS IS ' DBSTATUS
                  PERFORM 999-STOP-RUN.Procedure Division:
622-CREATE-031-RECORD.
          MOVE R9NMID TO WS-ID.
          PERFORM 630-CREATE-RECORD.
          DISPLAY R9CQAA ' ' R9CMAA ' ' R9KHAA ' ' R9B1AA
                  ' ' R9B2AA.
             WRITE STUDENT-HISTORY-REC
                INVALID KEY
                    DISPLAY 'DBSTATUS IS ' DBSTATUS.
                  CONTINUE.
             EVALUATE DBSTATUS
                 WHEN "22"
               DISPLAY "DUPLICATE PRI KEY: ", STUDENT-HISTORY-REC
          ADD 1 TO WS-COUNT-3.As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.