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 11, 2025

Db2 JSON functions for RPG data structures

In some of the currently most used languages like Python and Node.js, it is common to define a data structure for your JSON payload, which is then easily transformed into JSON. In Python, we usually define a dictionary with all the fields and our values, while Node.js usually goes down the route of creating an object, which is very similar to a Python dictionary in use.

Therefore, as JSON becomes more and more widely used, it would be great to have (at least) two functions added into Db2, for use in embedded SQL.

  • A function for DS -> JSON

  • A function for JSON -> DS

It is important that this is a complete solution, meaning that both JSON objects and JSON arrays should be supported.

This would allow an RPG program to more easily handle structured JSON data and make the developer experience much better.

Example

Dcl-Ds MyDs Qualified;
MyChar Char(1);
MyCharArray Char(1) Dim(20);
End-Ds;

Should turn into something like:

{
"MyChar": "X",
"MyCharArray": ["A", "B", "C", "1", "2", ...]
}

And of course the reverse operation would load from the JSON, into MyDs for use in the RPG program.

The YAJL library from Scott Klement can be used as reference, as it provides the needed functionality, but requires a bit more boilerplate code and setup, than I imagine a built-in Db2 function would.

I am aware of the current capabilities of Db2 when it comes to JSON, and have used it with success, but I would like to have the same functionality on DS level.

Idea priority Medium
  • Guest
    Nov 26, 2025
    IBM does not intend to provide a solution to this Idea at this time, so it is being closed.

    The database team has many other higher priority enhancement requests, so this could not be implemented any time soon. This Idea makes working with JSON easier, but doesn't add any distinct new functionality to the SQL user. This distinction makes it a lower priority than other requests to add new features that the team is considering.

    Db2 for i development team
    IBM Power Systems Development
  • Admin
    Carmelita Ruvalcaba
    Nov 25, 2025

    The CAAC has reviewed this IBM Idea and recommends that IBM not implement this request.

    This functionality already exists within Db2 and RPG. Like JSON_table, JSON_parser in SQL and for RPG data_into

    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
    Nov 20, 2025

    Isn't this exactly what DATA-GEN with yajl does?

  • Guest
    Nov 11, 2025

    It would make a lot of sense for RPG to support this functionality natively.