COMMON SYSTEM COMPLETION CODES AND POSSIBLE CAUSES

A general explanation of each condition code is given and then possible causes are listed. A program that abends will not always produce one of these codes, but may indicate only a 'USER ERROR'. If this is the case then the programmer should determine which type of statement the program abended on and this will indicate the general category that the error is in. For example, if the program abended on a READ statement, then the error is probably a problem with a file. Once the general category of the error is known then each of the possible causes for that category can be checked.

001 - This error usually indicates that there is some problem with a file. It usually occurs on a READ, WRITE, OPEN or CLOSE statement.

  1. A DDname used on a SELECT statement was incorrect
  2. No CMS file name was specified on the COBRUN statement
  3. The BLOCK CONTAINS clause is missing or incorrect
  4. The input record is the wrong length
  5. The program tried to READ a file after end-of-file
  6. The program tried to WRITE to an input file

0C1 - Operation Exception - The system attempted to execute a machine language instruction but it was not a valid operation.

  1. An attempt was made to READ or WRITE a file that was not OPEN
  2. A DDname used on a SELECT statement was incorrect
  3. A subscript exceeded the size of a table
  4. A SORT was used with the USING or GIVING clause and one of the files to be used was already OPEN

0C4 - Protection Exception - The program attempted to reference an area of memory outside of its allowed area.

  1. An input or output area was referenced before OPENing the file or after end-of-file
  2. A DDname used on a SELECT statement was incorrect
  3. A subscript exceeded the size of a table
  4. An attempt was made to READ or WRITE a file that was not OPEN

0C7 - Data Exception - This error indicates that a numeric field contained non-numeric data. It usually occurs on an arithmetic statement or a MOVE with numeric fields.

  1. An input field contained non-numeric data
  2. A field in WORKING-STORAGE was not initialized
  3. A subscript exceeded the size of a table

0CA - Decimal Overflow Exception - A field was too small to contain the result of an arithmetic operation.

0CB - Decimal Divide Exception - A quotient exceeds the size of the field it is being stored in.

  1. An attempt was made to divide by zero
  2. The field that will contain the quotient is too small