|
I have a Report program that when run interactive it generates the report normally, but when run in batch it generates the following SQL error: [SQL0104] SQLCODE = -104 003 FOR WITH FETCH ORDER UNION OPTIMIZE SQLSTATE = 42601 C/EXEC SQL C+ CONNECT RESET C/END-EXEC * Prepare the SQL statement C/EXEC SQL PREPARE SEL FROM :PSQL C/END-EXEC c Exsr ErrorSr * Declare the SQL cursor to hold the data retrieved from the C/EXEC SQL DECLARE MYCSR CURSOR FOR SEL C/END-EXEC c Exsr ErrorSr * Open the SQL cursor. C/EXEC SQL OPEN MYCSR C/END-EXEC c Exsr ErrorSr * Make selection case-insensitive C/EXEC SQL C+ SET OPTION SRTSEQ = *LANGIDSHR C/END-EXEC c/EXEC SQL FETCH MYCSR INTO :DSFIELDS c/END-EXEC Any ideas? Thanks for you help, Marco.
As an Amazon Associate we earn from qualifying purchases.
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.