× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Here are a couple of problems I've found using the Verify feature for COBOL.

1. In COBOL, the EXEC SQL INCLUDE SQLCA END-EXEC statement brings in a
virtual include file containing the SQL communications area. Verify fails
on this statement unless you actually have an SQLCA copybook in your include
path.

2. If you create a paragraph with just SQL statements, Verify fails with a
"paragraph contains no lines" error (and sometimes other weird things
happen, but that's the primary problem).

The workaround for problem 1 is to create an SQLCA copybook. As far as I
can tell, the COBOL SQL precompiler ignores this copy book.

The workaround for problem 2 is to put a non-SQL line at the beginning of
the paragraph. I code a MOVE 0 TO SQLCODE at the beginning of each
paragraph.

Joe

P.S. Here's the copy book I use. It could probably be smaller; you really
only need those SQLCA variables you use in your program.

01 SQLCA GLOBAL.
05 SQLCAID PIC X(8) VALUE X"0000000000000000".
05 SQLCABC PIC S9(9) BINARY.
05 SQLCODE PIC S9(9) BINARY.
05 SQLERRM.
49 SQLERRML PIC S9(4) BINARY.
49 SQLERRMC PIC X(70).
05 SQLERRP PIC X(8).
05 SQLERRD OCCURS 6 TIMES
PIC S9(9) BINARY.
05 SQLWARN.
10 SQLWARN0 PIC X.
10 SQLWARN1 PIC X.
10 SQLWARN2 PIC X.
10 SQLWARN3 PIC X.
10 SQLWARN4 PIC X.
10 SQLWARN5 PIC X.
10 SQLWARN6 PIC X.
10 SQLWARN7 PIC X.
10 SQLWARN8 PIC X.
10 SQLWARN9 PIC X.
10 SQLWARNA PIC X.
05 SQLSTATE PIC X(5).



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.