Handling COBOL Errors

If your COBOL program needs error handling, try the following procedure:

  1. Add a field (return code) to your state record.

  2. Initialize the field to a negative value.

  3. Pass the value into the Application Engine program.

  4. At the successful completion of the Application Engine program, change the field value to a positive value.

  5. Check for that value in your COBOL program.