× 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.


  • Subject: re: Embedded SQL codes
  • From: <groyle@xxxxxxxx> (Gordon S. Royle)
  • Date: Thu, 29 Mar 2001 15:10:15 -0500

You might try this link http://www.damos.dircon.co.uk/db2hp.htm
It doesn't cover them all but hits the main ones. 

As a general rule 00000 means I got it, 00100 means I coudn't find it (also 
EOF). Negative means an error of some sort occurred.

Gord Royle
Cott Corporation
---------- Original Text ----------

From: "Bartell, Aaron L. (TC)" <ALBartell@taylorcorp.com>, on 3/29/01 2:31 PM:

I have an RPG pgm that has SQL in it and I am currently trying to find what
I need to check for the SQL code that gets returned after I do a read.  For
example:

C/EXEC SQL

C+ FETCH RELATIVE :LastRRN FROM C1 INTO :STATUS, :SND_ID, :SND_TYPE,

C+ :SND_BATCH, :SND_NUM_RC, :SND_NUM_DC, :SND_DATE, :SND_TIME, :REC_ID,

C+ :REC_DATE, :REC_TIME, :CurRRN

C/END-EXEC


C                   dow       (SQLCOD <> 100)

C/EXEC SQL                                                             
C+ FETCH NEXT FROM C1 INTO :STATUS, :SND_ID, :SND_TYPE, :SND_BATCH,    
C+ :SND_NUM_RC, :SND_NUM_DC, :SND_DATE, :SND_TIME, :REC_ID, :REC_DATE, 
C+ :REC_TIME, :CurRRN                                                  
C/END-EXEC                                                             
 *                                                                     
C                   ENDDO             

I got the above code from somebody else and am wondering where I can find a
list of possible SQL codes.  Anybody know?

Aaron Bartell                                 
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---




_______________________________________________________________

Cott - The Leader in Premium Retailer Brand Beverage Innovation. 
_______________________________________________________________
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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 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.