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 Future consideration
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Aug 1, 2023

SQLRPGLE precompiler - SQLTYPE(CLOB:x) to VARCHAR instead of to DS

Add a d-spec and/or ctl-opt keyword to instruct the SQL precompiler to convert SQLTYPE(CLOB:x) (and BLOB etc.) to VARCHAR(x:4) instead of the UNS(10)/CHAR(x) DS that it currently converts to.

// This
dcl-s myVar1 SQLTYPE(CLOB:X);
// Pecompiles to this:
dcl-ds myVar1;
myVar_LEN UNS(10);
myVar_DATA CHAR(x);
end-ds;

// But this
dcl-s myVar2 SQLTYPE(CLOB:X:*VAR);
// Pecompiles to this:
dcl-s myVar2 VARCHAR(x:4);

// And this:
ctl-opt SQLLOBTYPE(*VAR);
// Applies *VAR globally to the program - makes all SQLTYPE(CLOB:X) act like SQLTYPE(CLOB:X:*VAR)

This would have the benefit of allowing CLOBs to be directly used with regular RPGLE BIFs such as %trim, %scan, %xlate, etc. with no conversion, and no need to reference different variants of the variable name in different circumstances. All of this serves to simplify the use of CLOB columns in SQLRPGLE processing.

A VARCHAR(x:4) has an identical structure in memory to the DS (4 bytes unsigned int for length, then x bytes character), and the SQL precompiler, when it converts SQL statements, references with with %ADDR so I think this would be a pure precompiler change?

Thanks to Scott Klement, and JonBoy of https://code400.com/forum, for the discussion - sorry I forgot about it for so long!
https://code400.com/forum/forum/iseries-programming-languages/rpg-rpgle/151378-safe-to-pointer-overlay-a-varchar-onto-a-clob

Idea priority Medium
  • Admin
    Carmelita Ruvalcaba Cevallos
    Reply
    |
    Apr 23, 2024

    The CAAC has reviewed this IBM Idea and recommends that IBM view this as a high priority Idea that is important to be addressed.

    This is as value, as more and more webservices are being used and varchar being the preferred character set.

    Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual IBM Ideas on the broader IBM i community and has therefore reviewed your Idea.

    For more information about CAAC, see www.common.org/caac

    Carmelita Ruvalcaba - CAAC Program Manager

  • Guest
    Reply
    |
    Aug 29, 2023
    IBM will use this Idea as input to planning, but no commitment is made or implied. This Idea will be updated in the future if IBM implements it.

    Db2 for i development team
    IBM Power Systems Development