HP 3000 Manuals

Run-Time Errors [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation


HP COBOL II/XL Reference Manual

Run-Time Errors 

Errors that can occur while your program is executing are listed here.
Some error messages include a number in square brackets.  These numbers
indicate the file status codes.

Unless otherwise indicated, the following action is taken for a run-time
I/O error (messages 520 through 699 are I/O errors).

   *   The error message is printed.

   *   If the error is file related (most are) the file system error is
       printed and a PRINTFILEINFO is executed.

   *   If a USE procedure, an AT END clause, an INVALID KEY clause, or a
       FILE STATUS word is specified (that is, you have some programmatic
       way to detect the error), then execution is allowed to continue.
       In most cases the error message is suppressed.  Otherwise a QUIT
       is issued to terminate the program.  For more information see
       "Input-Output Error Handling Procedures" .

See also Appendix H  for more information on handling run-time errors.

---------------------------------------------------------------------------------------

500      ERROR      INTERNAL SORT/MERGE ERROR ! (COBERR 500)
         MESSAGE

         CAUSE      See previous errors, for the detailed HPSORT error.  The
                    substitution is the status returned by HPSORT.

---------------------------------------------------------------------------------------

520      ERROR      ATTEMPT TO CLOSE A FILE THAT IS NOT OPEN [42] (COBERR 520)
         MESSAGE

         CAUSE      [REV BEG]An attempt was made to CLOSE a file which is not open.
                    This is usually the result of a program logic error.  Remove the
                    redundant CLOSE statement or insert any necessary OPEN statement
                    and recompile the source program.

                    See also error 520 ITEM REDEFINES AN ITEM CONTAINING A REDEFINES
                    CLAUSE in the section "Nonstandard Warnings".[REV END]

---------------------------------------------------------------------------------------

540      ERROR      ATTEMPT TO OPEN A FILE THAT IS OPEN [41] (COBERR 540)
         MESSAGE

         CAUSE      An attempt was made to OPEN a file which is currently open.  This
                    is usually the result of a program logic error.  Remove the
                    redundant OPEN statement or insert any necessary CLOSE statement
                    and recompile the source program.
---------------------------------------------------------------------------------------

551      ERROR      READ ERROR ON ACCEPT (COBERR 551)
         MESSAGE

         CAUSE      An attempt to execute a ACCEPT statement resulted in an error.

---------------------------------------------------------------------------------------

611      ERROR      WRITE ERROR ON DISPLAY (COBERR 611)
         MESSAGE

         CAUSE      An attempt to execute a DISPLAY statement resulted in an error.  IT
                    could also occur for ACCEPT from CONSOLE.

---------------------------------------------------------------------------------------

631      ERROR      USER LABEL SPACE UNALLOCATED OR ATTEMPT TO WRITE BEYOND LABEL LIMIT
         MESSAGE    [9x] (COBERR 631)

         CAUSE      An error occurred while reading/writing a label.  Refer to the file
                    system error.

---------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------

         632      ERROR      READ MUST PRECEDE ! [43] (COBERR 632)
                  MESSAGE

                  CAUSE      In sequential access mode, a READ must be the previous operation on
                             the file, before REWRITE or DELETE.

------------------------------------------------------------------------------------------------

         633      ERROR      UNABLE TO CLOSE FILE, SEE FILE SYSTEM ERROR [9x] (COBERR 633)
                  MESSAGE

                  CAUSE      An error occurred while attempting to CLOSE a file.  Refer to the
                             file system error.

------------------------------------------------------------------------------------------------

         636      ERROR      RECORD NOT FOUND [23] ! (COBERR 636)
                  MESSAGE

                  CAUSE      An I/O statement was executed which addressed a nonexistent record.

------------------------------------------------------------------------------------------------

         637      ERROR      DUPLICATE KEY [22] ! (COBERR 637)
                  MESSAGE

                  CAUSE      A WRITE statement was executed which would have created a duplicate
                             key.  The record already exists.

------------------------------------------------------------------------------------------------

         638      ERROR      [REV BEG]FILE NOT OPENED OR MODE INCORRECT [47,48,49,9x] ! (COBERR
                  MESSAGE    638)[REV END]

                  CAUSE      The file was not open, or was open with the incorrect mode.  For
                             example, trying to WRITE to a file opened in INPUT mode.  Or a
                             DELETE or REWRITE was executed for a file which was not opened in
                             I-O mode.

------------------------------------------------------------------------------------------------

         639      ERROR      ATTEMPT TO ! A FILE THAT IS NOT OPEN [9x] (COBERR 639)
                  MESSAGE

                  CAUSE      An EXCLUSIVE, UN-EXCLUSIVE, or SEEK statement was executed for a
                             file which was not OPEN. This is usually the result of a program
                             logic error.  Remove the redundant statement or insert any
                             necessary OPEN statement and recompile the program.

------------------------------------------------------------------------------------------------
[REV BEG]

         640      ERROR      ATTEMPT TO OPEN A FILE WITH AN INVALID DYNAMIC FILE NAME [31] &
                  MESSAGE    (COBERR 640).

                  CAUSE      The contents of the data item specified as containing the dynamic
                             file name in the USING phrase of the SELECT clause do not form a
                             legal file name or are not consistent with the name or literal in
                             the ASSIGN phrase of that SELECT clause.  This is usually the
                             result of improper or missing initialization.  Verify that the data
                             item is initialized to a valid file name.[REV END]

------------------------------------------------------------------------------------------------

         641      ERROR      FILE IN USE BY ANOTHER PROCESS [9x] (COBERR 641)
                  MESSAGE

                  CAUSE      An EXCLUSIVE CONDITIONALLY was executed for a file for which some
                             other process had already executed an EXCLUSIVE. No USE procedure
                             or FILE STATUS word was specified.

------------------------------------------------------------------------------------------------

         642      ERROR      FILE IS LOCKED BY A CLOSE [38] (COBERR 642)
                  MESSAGE

                  CAUSE      An OPEN statement was executed for a file which was locked by a
                             previous CLOSE statement.  The CLOSE WITH LOCK option prevents a
                             file from being reopened within the current run-unit.  Correct the
                             program and recompile.

------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------

644      ERROR      UNABLE TO OPEN FILE, SEE FILE SYSTEM ERROR [9x] (COBERR 644)
         MESSAGE

         CAUSE      An attempt to execute an OPEN statement failed.  Refer to the file
                    system error.

---------------------------------------------------------------------------------------

645      ERROR      I/O ERROR ON OPEN [9x] (COBERR 645)
         MESSAGE

         CAUSE      An I/O error occurred while attempting to write CCTL information
                    during an OPEN. Refer to the file system error.

---------------------------------------------------------------------------------------

646      ERROR      TOP TOO LARGE IN LINAGE CLAUSE (COBERR 646)
         MESSAGE

         CAUSE      The value of the TOP specification within the LINAGE clause was
                    larger than 63.  Zero is assumed.

---------------------------------------------------------------------------------------

647      ERROR      FILE NOT FOUND [35] (COBERR 647)
         MESSAGE

         CAUSE      An OPEN statement was executed for a file that could not be found.

---------------------------------------------------------------------------------------

648      ERROR      FILE'S FIXED ATTRIBUTES DIFFER FROM PROGRAM [39]! (COBERR 648)
         MESSAGE

         CAUSE      The file organization declaration within the ENVIRONMENT DIVISION
                    is different than the organization of the actual file for which an
                    OPEN statement was executed.  Compare the two organizations and
                    adjust as necessary to correct the problem.  This could also occur
                    if the record size does not match the size of the FD records.  It
                    could also occur if the KEY types in an INDEXED file do not match
                    or the presence or absence of the WITH DUPLICATES clause does not
                    match.  Use the RECORD CONTAINS clause to specify the minimum and
                    maximum valid record sizes.

---------------------------------------------------------------------------------------

649      ERROR      RECORDS MUST BE IN ASCENDING ORDER BY KEY [21] (COBERR 649)
         MESSAGE

         CAUSE      If a INDEXED file was created by COBOL, then whenever a OPEN OUTPUT
                    with ACCESS MODE SEQUENTIAL is done, the key values must be written
                    in primary key order.

---------------------------------------------------------------------------------------

650      ERROR      END OF FILE ENCOUNTERED UPON READ [10,46] (COBERR 650)
         MESSAGE

         CAUSE      A READ statement was executed and no record was found.

---------------------------------------------------------------------------------------

653      ERROR      FILE ALREADY OPEN WITH SAME AREA OR IS MULTIPLE FILE (COBERR 653)
         MESSAGE

         CAUSE      An OPEN statement was executed for a file which was specified in a
                    SAME AREA clause that was in use or for a file which was listed in
                    a MULTIPLE FILE clause which specified a file which was already
                    open.

---------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------

655      ERROR      SEQ ERROR ON LABELED TAPE (COBERR 655)
         MESSAGE

         CAUSE      An OPEN statement resulted in a SEQ error for a labeled tape.
                    Refer to the file system error.

---------------------------------------------------------------------------------------

658      ERROR      RELATIVE KEY OVERFLOW [14,24] ! (COBERR 658)
         MESSAGE

         CAUSE      The value for a RELATIVE KEY item has overflowed while attempting
                    to execute WRITE/READ statement to a relative file.  The PICTURE
                    for the RELATIVE KEY needs more digits.

---------------------------------------------------------------------------------------

659      ERROR      FILE/ORG/DEVICE DOES NOT SUPPORT OPEN MODE [37] ! (COBERR 659)
         MESSAGE

         CAUSE      An attempt was made to execute an OPEN statement on a device that
                    does not support the OPEN mode specified, for example, OPEN INPUT
                    for a line printer device.  This could also occur if the file
                    system, possibly through a file equation or security, does not
                    honor the open mode.[REV BEG] Or, use of a :FILE equation ACCESS=
                    option conflicts with the OPEN mode.  (Such as OPEN I-O versus
                    ACCESS=IN.)[REV END]

---------------------------------------------------------------------------------------

664      ERROR      I/O ERROR ON ! [30,9x] (COBERR 664)
         MESSAGE

         CAUSE      An I/O error occurred.  Refer to the file system error.  Or an
                    attempt was made to execute an EXCLUSIVE statement for more than
                    one file at a time.  This requires that you have the MR capability.
                    Database locks are equivalent to EXCLUSIVE.

---------------------------------------------------------------------------------------

665      ERROR      END OF FILE ENCOUNTERED UPON WRITE [24] (COBERR 665)
         MESSAGE

         CAUSE      An attempt was made to WRITE beyond the end of file.  Refer to the
                    file system error.

---------------------------------------------------------------------------------------

666      ERROR      ERROR WHILE READING/WRITING USER LABEL [9x] (COBERR 666)
         MESSAGE

         CAUSE      An error occurred while reading/writing the label.  Refer to the
                    file system error.
---------------------------------------------------------------------------------------

668      ERROR      LINAGE, TOP, BOTTOM, FOOTING > 32767 NOT ALLOWED, RESET TO 32767
         MESSAGE    (COBERR 68)

         CAUSE      Check the LINAGE, TOP, BOTTOM and FOOTING clauses.

---------------------------------------------------------------------------------------

671      ERROR      RECORDS LARGER THAN FD DESCRIPTION, TRUNCATED [44] (COBWARN 671)
         MESSAGE

         CAUSE      The record length found when the input file was opened was larger
                    than the amount of space specified in the largest FD description
                    for this file.  Any records which are too long will be truncated.

---------------------------------------------------------------------------------------

672      ERROR      RECORD SIZE DOES NOT MATCH FD DESCRIPTION [44] ! (COBERR 672)
         MESSAGE

         CAUSE      The record size of the file does not match the minimum and maximum
                    valid sizes in the RECORD CONTAINS clause.

---------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------

673      ERROR      FD DESCRIPTION LARGER THAN RECORD SIZE, TRUNCATED [44] (COBWARN
         MESSAGE    673)

         CAUSE      The record length found when the file was opened for output was
                    smaller than the FD record description.  Data written to this file
                    will be truncated.

---------------------------------------------------------------------------------------

706      ERROR      UNDERFLOW IN EXPONENTIATE (COBERR 706)
         MESSAGE

         CAUSE      The result value of an exponentiation operation has resulted in an
                    underflow.  The result falls in the range -10**-28 to +10**-28.

---------------------------------------------------------------------------------------

707      ERROR      OVERFLOW IN EXPONENTIATE (COBERR 707)
         MESSAGE

         CAUSE      The result value of an exponentiation operation has resulted in an
                    overflow.  The result has exceeded the range -10**-28 to +10**-28.

---------------------------------------------------------------------------------------

708      ERROR      UNDEFINED RESULT FROM EXPONENTIATE (COBERR 708)
         MESSAGE

         CAUSE      The result value of an exponentiation operation is undefined.  An
                    attempt was made to compile A**B, where A is EQUAL or LESS THAN 0
                    and B is not an integer.

---------------------------------------------------------------------------------------

709      ERROR      ILLEGAL DIGIT IN NUMERIC DATA ITEM, TREATED AS 0 ! (COBERR 709)
         MESSAGE

         CAUSE      There was a bad digit in an item input with ACCEPT FREE or in a
                    source item for UNSTRING. This digit was changed to zero.

---------------------------------------------------------------------------------------

710 *    ERROR      ILLEGAL DECIMAL DIGIT (COBERR 710)
         MESSAGE

         CAUSE      An illegal packed decimal digit was encountered in execution.
                    Correct the data and re-run the program.
                    NM : The invalid data and the location is printed.  The program may
                    abort or continue to execute based on the VAR COBRUNTIME.
                    CM : Possible instructions are:  ADDD, SUBD, CMPD, SLD, NSLD, SRD,
                    DIVD, MPYD. The invalid data and the instruction type is printed on
                    the list device and the program is aborted.

---------------------------------------------------------------------------------------

* See the section "Run-Time Trap Handling" in Appendix H  for more
information.

------------------------------------------------------------------------------------------------

         711 *    ERROR      ILLEGAL ASCII DIGIT (COBERR 711)
                  MESSAGE

                  CAUSE      An illegal ASCII digit was encountered in execution.  The invalid
                             data and the location is printed.  Correct the data, if necessary,
                             and re-run the program.
                             NM : The program may abort or continue to execute based on the VAR
                             COBRUNTIME.
                             CM : Possible instructions are:  CVDA, CVAD, CVDB, EDIT, CVND. The
                             invalid data and the instruction type is printed on the list device
                             and the program may abort or continue to execute based on the
                             ability to successfully FIXUP the bad digit.[REV BEG] Refer to the
                             article entitled "COBOL II/3000 Programs:  Tracing the Illegal Data
                             Using Error 710/711 Documentation," published in Issue #28 of the
                             Communicator for additional details on error 710/711
                             processing.[REV END]

------------------------------------------------------------------------------------------------
[REV BEG]

         745      ERROR      BAD PARAMETER TO !, ERROR ! (COBERR 745)
                  MESSAGE

                  CAUSE
                                *   A bad input value was detected for NUMVAL or NUMVAL-C
                                    functions.  Check for comma, decimal point, and currency
                                    values.
                                *   A bad input value was detected for INTEGER-OF-DATE or
                                    INTEGER-OF-DAY functions.  Check that YYY is > 1600 and that
                                    MM and DD or DDD are valid.
                                *   A bad input value was detected for DATE-OF-INTEGER or
                                    DAY-OF-INTEGER functions.  Check that the input value > 0.

                                  Error          Cause
                                    1     Alpha char in beginning.
                                    2     Embedded space in numeric string.
                                    3     Too many signs (includes +, -, CR, and DB).
                                    4     Too many decimal points.
                                    5     Numbers and alphabetic characters mixed.
                                    6     Number of digits > 18.
                                    7     Something other than CR or DB found in string.
                                    8     Illegal currency sign.
                                    9     Illegal input format for the string.
                                   11     Error in date.
                             [REV END]

------------------------------------------------------------------------------------------------

         746      ERROR      NO EXCEPTION PHRASE ON CALL, ERROR ! (COBERR 746)
                  MESSAGE

                  CAUSE      An error occurred trying to dynamically load a procedure.  The
                             parameter is the loader error number.
------------------------------------------------------------------------------------------------

         747 *    ERROR      NO SIZE ERROR PHRASE (COBERR 747)
                  MESSAGE

                  CAUSE      This message occurs for any SIZE ERROR condition on a verb that
                             does not have a SIZE ERROR phrase.  It also may occur on MOVEs if
                             the data in a BINARY item does not match its picture.[REV BEG] This
                             error will also occur for any type of IEEE floating point
                             exceptions that occur when evaluating FUNCTIONs.  That is, divide
                             by zero or taking a square root of a negative number.[REV END]

------------------------------------------------------------------------------------------------

* See the section "Run-Time Trap Handling" in Appendix H  for more
information.

---------------------------------------------------------------------------------------

748 *    ERROR      PARAGRAPH STACK OVERFLOW (COBERR 748)
         MESSAGE

         CAUSE      Recursive performs, or performs with common exit points.  Or
                    illegal GOTOs out of a PERFORMed procedure.

---------------------------------------------------------------------------------------

749      ERROR      COLLATING SEQUENCE NOT SUPPORTED, ERROR ! (COBERR 749)
         MESSAGE

         CAUSE      NLINFO (Native Language) returned an error.

---------------------------------------------------------------------------------------

750      ERROR      DEPENDING-ON IDENTIFIER OUT OF BOUNDS (COBERR 750)
         MESSAGE

         CAUSE      The depending on identifier was not between occurs-1 and occurs-2.
                    This error only occurs when you select the BOUNDS option of the
                    $CONTROL compiler subsystem command.  Correct the program by
                    removing the bounds violation.

---------------------------------------------------------------------------------------

751 *    ERROR      SUBSCRIPT/INDEX/REFMOD/DEP-ON OUT OF BOUNDS (COBERR 751)
         MESSAGE

         CAUSE      This error only occurs when you select the BOUNDS option of the
                    $CONTROL compiler subsystem command.  Correct the program by
                    removing the bounds violation.  For CM, only the first two errors
                    apply.[REV BEG] This could also occur for the function CHAR.[REV
                    END]

---------------------------------------------------------------------------------------

752      ERROR      REFERENCE MODIFICATION OUT OF BOUNDS (COBERR 752)
         MESSAGE

         CAUSE      This error only occurs when you select the BOUNDS option of the
                    $CONTROL compiler subsystem command.  Correct the program by
                    removing the bounds violation.

---------------------------------------------------------------------------------------

753 *    ERROR      ADDRESS ALIGNMENT ERROR (COBERR 753)
         MESSAGE

         CAUSE      Parameter is not on a 32- or 16-bit boundary.

---------------------------------------------------------------------------------------

754 *    ERROR      INVALID GOTO (COBERR 754)
         MESSAGE

         CAUSE      GOTO. was not ALTERed before use.  Could also occur for RETURN
                    without SORT/MERGE or GOTO MORE-LABELS without OPEN.

---------------------------------------------------------------------------------------

* See the section "Run-Time Trap Handling" in Appendix H  for more
information.



MPE/iX 5.0 Documentation