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 Delivered
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Mar 18, 2020

SQL Char function codepage conversion

The SQL Char function allows character to character codepage conversions, however this seems to be very limited as I always get an SQL0332, even for basic conversions as 500 to 819.


Use Case:

The SQL Char function can be used as a replacement for API coding to iconv(). This would be much easier to use.


Idea priority High
  • Guest
    Reply
    |
    Nov 23, 2020

    IBM believes that the request described has been solved and is available with IBM i 7.4 SF99704 Level 7 and IBM i 7.3 SF99703 Level 18.

    With the INTERPRET scalar function you can correct data that has been tagged with the wrong CCSID as shown in the following example. Note that the INTERPRET function requires the first argument to be a binary data type which removes any existing CCSID assumptions from the string.

    create table qtemp.t500 (c500 char(10) ccsid 500);

    insert into qtemp.t500 values cast('[abc]' as char(10) ccsid 65535);
    select hex(c500) from qtemp.t500; --BA818283BB4040404040 (contains ccsid 37 character data)

    update qtemp.t500 set c500 = interpret(cast(c500 as binary(10)) as char(10) ccsid 37); -- correctly tag the data with it's CCSID with the INTERPRET function. The update performs the conversion from CCSID 37 to CCSID 500
    select hex(c500) from qtemp.t500; --BA818283BB4040404040 (now the column contains ccsid 500 character data)

  • Guest
    Reply
    |
    Jul 21, 2020

    The CAAC has reviewed this requirement. IBM has already provided a function in IBM i 7.4 and IBM i 7.3 with a new function called "Interpret" that provides functionality to correct the data you need to correct. This was provided in the May 2020 Technology Refreshes.

    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 RFEs on the broader IBM i community, and has therefore reviewed your RFE.

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

    For more details about CAAC's role with RFEs, see http://www.ibmsystemsmag.com/Blogs/i-Can/May-2017/COMMON-Americas-Advisory-Council-%28CAAC%29-and-RFEs/

    Nancy Uthke-Schmucki - CAAC Program Manager

  • Guest
    Reply
    |
    Jun 8, 2020

    Char to Char casting doesn't support any codepage conversions.

    The reason we need this is due to files filled with incorrect data (due to a bad emulator setting). Before correcting the emulator setting we need to correct the data first (we now have tables that have CCSID 37 data in a CCSID 500 column).

  • Guest
    Reply
    |
    Mar 20, 2020

    have you tried with cast?
    Is there a reason that is it not enough?
    What is your use case?