Skip to Main Content
IBM Power Ideas Portal


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


Shape the future of IBM!

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:

Search existing ideas

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 your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

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.

Status Not under consideration
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Nov 28, 2017

Disabled the looging of negative sql codes in the JOBLOG of a JOB

In RGP developments embedding SQL when we encounter a Negative SQL code, even if it is managed in the program, it returns lines in the processing JOBLOG.
So a log of several thousand lines is generated if the program returns a lot of negative SQL code
It would be necessary to be able to disable this logging SQL, without deactivated the rest of the LOG, in order to lighten the log spool file.


Use Case:

In a RPGSQLLE program
If we make an INSERT INTO in a table and we provoke a SQL code -803 (duplicate key)
EXEC SQL
INSERT INTO table(champ1, Champ2,…)
VALUES (:Value1,
:Value2,
…;

SELECT;
When Sqlcode = 0;

when Sqlcode = -803;
EXEC SQL
UPDATE table
SET champ1 = :Value1,…
WHERE Champ1 = :Value1

select;
When Sqlcode = 0;

When Sqlcode = 100;
---
Other;

ENDSL;
When Sqlcode = 100;

Other;

ENDSL;
In joblog's spool of joblog we find
SQL0803 Diagnostic 30 27/11/17 13:49:51,647875 QSQRUN3 QSYS *STMT QSQRUN3 QSYS *STMT
Module d'origine . . . . . : QSQINS
Procédure d'origine . . . . : CLEANUP
Instruction . . . . . . . . : 33233
Module de destination . . . : QSQINS
Procédure de destination . : CLEANUP
Instruction . . . . . . . . : 33233
Message . . . . : La valeur indiquée est incorrecte car elle produirait une
clé en double.
CPF5009 Diagnostic 10 27/11/17 13:49:51,648286 QDBSIGEX QSYS 0FA1 QSQRUN3 QSYS *STMT
Module de destination . . . : QSQINS
Procédure de destination . : SQL_Insert
Instruction . . . . . . . . : 12324
Message . . . . : Clé d'enregistrement en double dans le membre TC_TY00001.
CPF5034 Copie expéditeur 30 27/11/17 13:49:51,648294 QDBSIGEX QSYS 024E QDBSIGEX QSYS 024E
Message . . . . : Clé en double dans chemin d'accès.
CPF5034 Notification 30 27/11/17 13:49:51,648298 QDBSIGEX QSYS 024E QSQRUN3 QSYS *STMT
Module de destination . . . : QSQINS

Thus the generated JOBLOG can make several thousands of lines if there is a lot of code -803 which is useless because it is managed in the program


Idea priority Medium
  • Guest
    Reply
    |
    Apr 15, 2021

    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.

  • Guest
    Reply
    |
    Jun 25, 2020

    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

  • Guest
    Reply
    |
    Jun 25, 2020

    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.

  • Guest
    Reply
    |
    Nov 29, 2017

    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.

  • Guest
    Reply
    |
    Nov 28, 2017

    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.