|
Some choice passages from the SQL Programming manual: Every SQLCODE has a corresponding message in message file QSQLMSG in library QSYS. The message ID for any SQLCODE is constructed by appending the absolute value (5 digits) of the SQLCODE to SQ and changing the third character to 'L' if the third character is a 0. For example, if the SQLCODE is 30070, the message ID is SQ30070. A complete listing of DB2 for OS/400 SQLCODEs and their corresponding SQLSTATEs is provided in Appendix B of the DB2 for OS/400 SQL Programming book, SC41-3611. Message ID . . . . . . . . . : SQL0305 Message file . . . . . . . . : QSQLMSG Library . . . . . . . . . : QSYS Message . . . . : Indicator variable required. Cause . . . . . : A FETCH, an embedded SELECT, or a CALL statement has resulted in a null value, but an indicator variable was not specified for host variable &2. The relative position of the host variable in the INTO clause or parameter list is &1. If the host variable name is *N, an SQLDA was specified. Recovery . . . : Specify an indicator variable, and precompile the program again. You should see this message in the job log, too. Brian Johnson Help/Systems, Inc. brian.johnson@helpsystems.com www.helpsystems.com uucp@UUCP1.MCS.NET on 03/16/99 17:01:29 Please respond to MIDRANGE-L@midrange.com To: MIDRANGE-L@midrange.com cc: (bcc: Brian Johnson/HelpSystems) Subject: Embedded SQL in ILERPG Hello all, I am trying to retrieve data from an Oracle database using Oracle Access Manager and embedded SQL in ILERPG. I am selecting 12 columns from the ORacle table and inserting into a PF locally. I have problems with one of the Oracle columns and if I remove this column everything works fine. The problem is this: On Oracle the field is defined as : DESCRIPTION_2_TXT VARCHAR2(30) In the records that I need to retrieve, all the values are blank in this column . After I FETCH the cursor, SQLCA has the following values ( I've just pasted the msgs that I think are relevant) SQLCA DS SQLCOD BIN(9,0) -000000305. 'FFFFFECF'X .. +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.