473,788 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQLCODE groups

Hi!

I was searching through DB2 InfoCenter, but didn't find an answer to my
question:
When I get an SQLCODE from an SQL command (ADMIN_CMD for example) when I
want to know what this code means; is it a warning, error, ....

Best regards,
Kovi

--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 11 '07 #1
7 5076
Gregor Kovač wrote:
Hi!

I was searching through DB2 InfoCenter, but didn't find an answer to my
question:
When I get an SQLCODE from an SQL command (ADMIN_CMD for example) when I
want to know what this code means; is it a warning, error, ....
With SQLCODEs, you simply remove the sign and prepend "SQL" in front. This
gives you the message id corresponding to this SQLCODE. For example, if
you have SQLCODE = -104, the corresponding message is SQL104 (or SQL0104 if
you want to pad with leading '0's.)

p.s: It may be that there are exceptions to this rule; but so far I haven't
encountered any.
p.p.s: There is work on the way to get such information on a programmatical
way from DB2 itself.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Jul 11 '07 #2
Further: negative numbers are errors, positive numbers are warnings.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 11 '07 #3
Hi!

So, what Knut ans Serge are saying...
For example, with IMPORT I get in message file:
SQL3149N "1" rows were processed from the input file. "0" rows were
successfully inserted into the table. "1" rows were rejected.

And since this is code 3149 0, should I consider this is a warning?

Best regards,
Kovi

Gregor Kovač wrote:
Hi!

I was searching through DB2 InfoCenter, but didn't find an answer to my
question:
When I get an SQLCODE from an SQL command (ADMIN_CMD for example) when I
want to know what this code means; is it a warning, error, ....

Best regards,
Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 11 '07 #4
Gregor Kovač wrote:
Hi!

So, what Knut ans Serge are saying...
For example, with IMPORT I get in message file:
SQL3149N "1" rows were processed from the input file. "0" rows were
successfully inserted into the table. "1" rows were rejected.

And since this is code 3149 0, should I consider this is a warning?
The message id is SQL3149. To get the SQLCODE for this message (if it has
one), you can simply run:

$ db2 "? sql3149"

This particular message is _not_ associated with a SQLCODE.

However, there is another piece of information encoded in the message id.
The last character of the message id classifies the error like this:

'C' - critical error
'N' - normal error
'W' - warning
'I' - informational message

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Jul 11 '07 #5
Hi!

Great, this is exactly what I wanted to know. :))
Is there a page in DB2 InfoCenter where this is stated?

Best regards,
Kovi

Knut Stolze wrote:
Gregor Kovač wrote:
>Hi!

So, what Knut ans Serge are saying...
For example, with IMPORT I get in message file:
SQL3149N "1" rows were processed from the input file. "0" rows were
successfully inserted into the table. "1" rows were rejected.

And since this is code 3149 0, should I consider this is a warning?

The message id is SQL3149. To get the SQLCODE for this message (if it has
one), you can simply run:

$ db2 "? sql3149"

This particular message is _not_ associated with a SQLCODE.

However, there is another piece of information encoded in the message id.
The last character of the message id classifies the error like this:

'C' - critical error
'N' - normal error
'W' - warning
'I' - informational message
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 11 '07 #6
On Jul 11, 2:58 pm, Gregor Kova <gregor.ko...@m ikropis.siwrote :
Hi!

Great, this is exactly what I wanted to know. :))
Is there a page in DB2 InfoCenter where this is stated?

Best regards,
Kovi

Knut Stolze wrote:
Gregor Kova wrote:
Hi!
So, what Knut ans Serge are saying...
For example, with IMPORT I get in message file:
SQL3149N "1" rows were processed from the input file. "0" rows were
successfully inserted into the table. "1" rows were rejected.
And since this is code 3149 0, should I consider this is a warning?
The message id is SQL3149. To get the SQLCODE for this message (if it has
one), you can simply run:
$ db2 "? sql3149"
This particular message is _not_ associated with a SQLCODE.
However, there is another piece of information encoded in the message id.
The last character of the message id classifies the error like this:
'C' - critical error
'N' - normal error
'W' - warning
'I' - informational message
http://publib.boulder.ibm.com/infoce...c/r0002159.htm

http://publib.boulder.ibm.com/infoce...c/c0mintro.htm

HTH.

--
Jeroen
Jul 11 '07 #7
http://publib.boulder.ibm.com/infoce...c/c0mintro.htm

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 11 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7895
by: Tborn2b | last post by:
DB2 V 7, Z/OS: I receive an SQLCODE -104 for the following trigger : CREATE TRIGGER TRSERED1 NO CASCADE BEFORE INSERT ON SEMINAR REFERENCING NEW AS ZUGANG
5
45917
by: Jean-Marc Blaise | last post by:
Dear all, Could you explain why some SQL messages do not possess a SQLSTATE ? Why not transmitting the SQLSTATE of the original <sqlcode>, for example if you get a -911 on a RUNSTATS ? SQL2310N The utility could not generate statistics. Error "<sqlcode>" was returned.
3
9643
by: JDPope | last post by:
I have a situation which I cannot get a good lead on how to resolve. One of the applications I support uses the Hibernate software to generate SQL. The app is JAVA with JDBC. In testing the users see no problems and think the app is running okay. I turned a database monitor on the app and see that the database is getting SQL return coes of -301 for a variety of database accesses (some times the same access works, okay other times -301)....
15
7247
by: Twan Kennis | last post by:
Hi, I have a DB2 database on the IBM iSeries platform, on which I created several Stored Procedures with the SQLCODE as a return-parameter. These Stored Procedures are called from a Windows application (build in Visual Basic) using an ADO/OLE DB Provider on a IBM Client Access ODBC driver. On the Internet I found a whitepaper "SQL messages and codes" provided by IBM which describes a complete list of all SQLSTATEs, SQLCODEs and
2
46776
by: Richard | last post by:
Our web programmer was looking in his application log an found the following error: 2006-08-31 16:33:35,129 ERROR org.hibernate.util.JDBCExceptionReporter - < SQL0723N An error occurred in a triggered SQL statement in trigger "OLGCWEB.TBLPROPS_INS_TRG". Information returned for the error includes SQLCODE "-811", SQLSTATE "21000" and message tokens "". SQLSTATE=09000 2006-08-31 16:33:35,139 ERROR...
5
14521
by: misterutterbag | last post by:
Stack trace below. Only happens in WebSphere 6.0. DB2 v 8.2. FP12. Only against 1 database. I have other databases in this database instance, but they don't seem to have this problem. Looked up SQLCODE: -805. It said either a) the client and server versions don't match (which doesn't make
10
13234
by: scoonie999 | last post by:
I'm having a problem that I can't seem to find any solution for online. I'm using a cursor in a cobol program to fetch some data. I know for a fact that the select should return 2 rows. The fetch works as I would expect it to on the 2 rows, but then when I do my next fetch, the program ends abnormally. My next step is to check for sqlcode 100, as I would expect it to be, but my program never even gets to this step.
22
6662
by: Sri | last post by:
All Recenetly our shop migrated to DB2 V8 from V7. We are in IBM System Level: z/OS 1.6.1 @ RSU 0702. Processor : IBM 2064-1C7 (z/900) # 1B89 Mode: 64-bit One of my application is facing problem while testing their code/Jobs in DB2 V8 environments. The Details are: Job is abending with SQLCODE -302 SQL error on the prepare staement. There is no code modification made for many years. It is working fine in db2 V7 enviornments. The...
3
7349
by: lenygold via DBMonster.com | last post by:
Thank you very much SERGE for your help. I found example in Graeme Birchall COOKBOOK wich i think exactly what i need for SQL check in triggers: • User query joins to table function - sends DML or DDL statement to be executed. • Table function calls stored procedure - sends statement to be executed. • Stored procedure executes statement. • Stored procedure returns SQLCODE of statement to the table function.
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3674
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.