Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How are database errors reported to the COBOL program?

0
10 Posted

How are database errors reported to the COBOL program?

0
10

Where errors can be “translated” into a common COBOL error, this is done. For example, if a table was opened for input and it did not exist, a standard error “35” would be returned to the program. Where no suitable COBOL error exists, an error 9D is returned and a secondary error code is set. This secondary code is the code returned by the RDBMS. The programmer may make use of the ACUCOBOL-GT routine “C$RERR” to obtain the secondary code. Back to top • Must the database table match the COBOL FD exactly? All the columns named in the XFD file must exist, and have consistent data types. The behavior for any “extra” columns in the table is database dependent. For Informix and Oracle, extra columns are ignored. For other databases an error is generated, unless the configuration variable 4GL-EXTRA-DB-COLS-OK is set to “1”, in which case no error is produced. Obviously, for consistency, any key that does not allow duplicates should match a unique index in the table, but no other indexes are r

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123