This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
IBM does not intend to provide a solution to this request, so it is being closed.
The code snippet you provided indicates that you are correctly checking the SQLCODE after running the SQL INSERT statement. However, there is no way for SQL to recognize what you are going to do after the INSERT executes. The message gets written to the joblog when the INSERT statement is run. The application logic to check the SQLCODE is completely unknown to the SQL runtime processing of the INSERT statement.
If you change to use the SQL MERGE statement instead of relying on the SQL0803 error from INSERT, most of these messages will be eliminated from the joblog.
Due to processing by IBM, this request was reassigned to have the following updated attributes:
Brand - Servers and Systems Software
Product family - Power Systems
Product - IBM i
Component - Db2 for i
Operating system - IBM i
Source - None
For recording keeping, the previous attributes were:
Brand - Servers and Systems Software
Product family - Power Systems
Product - IBM i
Component - Application Development
Operating system - IBM i
Source - None
Going to close this RFE as a duplicate of - 135394 - Allow ability to control JobLog write with On-Error. These 2 are similar, and the 135394 is written in a way that we can deliver something.
Hello,
Negative codes are errors, even if managed I don't think it should be skipped, it could hide important information. For the case you're talking about, you might want to use MERGE rather than INSERT/UPDATE. It would avoid the overhead of the error processing.
It is true not only for SQL, but also for native RPG. If we write a record and it has a duplicate key, and the program manages the situation, either by %ERROR, Err-Indicator or MONITOR, it still write to the joblog.
Also, a chain to a subfile record and the record is not found, even if the program manages the situation, it produces a line in the joblog.