Skip to Main Content
IBM Z Software


This portal is to open public enhancement requests against IBM Z Software products. 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 Planned for future release
Workspace PL/I Compilers
Categories z/OS
Created by Guest
Created on Apr 22, 2025

Enhancement to the PL/I jsonGetValue built-in function to add a selector option to jsonGetValue which would allow specifying a condition for selecting an array element. The function would then only copy those elements that satisfy the condition.

For example, given the JSON document below, it would be great to specify we only want the item with "TRAINING": "Y" copied over to the PL/I structure.

JSON_DOCUMENT:

{
 "PASSES": 3,
 "DATA": [
   { "NAME": "Mather", "ELEVATION": 12100, "TRAINING": "Y" },
   { "NAME": "Pinchot", "ELEVATION": 12130, "TRAINING": "N" },
   { "NAME": "Glenn", "ELEVATION": 11940, "TRAINING": "N" }
 ]
}

PL/I Structure:

dcl
 1 info,
   2 passes fixed bin(31),
   2 data(3),
     3 name char(20) varying,
     3 elevation fixed bin(31)
     3 training char(1);

Usage Example:

 

read = jsonGetValue(p, n, , selector={data.training = "Y"}, info);

 

This function call would only return the items with TRAINING="Y" and move them to the PL/I structure.

Such an enhancement would be highly beneficial during parsing. For example, if a web service call returns an array of addresses, and the developer is only interested in the one with “primaryIndicator” set to True. Currently, developers cannot achieve this directly.  In order to do so now, developers must declare a structure and loop through it to find the desired element. The web service does not impose an upper bound on the number of addresses it can return; it merely sends an array and lets the caller pick the relevant one. This is straightforward in other languages like Java, but challenging in PL/I.

We expect this enhancement would be helpful for many use cases.

Idea priority Medium
  • Guest
    Jun 11, 2025
    Ok, we will proceed with allowing 3 additional arguments and the first would be a possibly qualified, but always unambiguous, element name

    We have been evaluating this some more, and we think there should be an optional 4th argument that would be an integer that would be set to the number of array elements assigned (and this would be useful even if this was the last argument since the source may not have as many array elements as the target even without a selector). Then we would have the selector, and we have 2 proposals for that:

    1) the selector is specified via 3 arguments: the name of a field, e.g. "TRAINING", an operator (EQ,NE,GT,etc), and a value to be tested for, e.g. "Y"
    or
    2) the selector is specified via one argument that is a function you write, that gets the name of an element we are about to assign to (so, "NAME", "ELEV" or TRAINING" in your example) and the value (as a string) that is about to be assigned to it (so, "MATHER", 12000, "Y", etc in your example). The function then returns 0 or 1 indicating if the selection should be made or not.

    option 1) is simpler and faster, but 2) offers more flexibility (for example, you could select for a range of values with it)

    I suppose, being PL/I, we could offer both 1) and 2) and let you choose which to use for various cases

    But do you have comments or preferencs?
  • Guest
    May 30, 2025
    We have been evaluating this some more, and we think there should be an optional 4th argument that would be an integer that would be set to the number of array elements assigned (and this would be useful even if this was the last argument since the source may not have as many array elements as the target even without a selector). Then we would have the selector, and we have 2 proposals for that:

    1) the selector is specified via 3 arguments: the name of a field, e.g. "TRAINING", an operator (EQ,NE,GT,etc), and a value to be tested for, e.g. "Y"
    or
    2) the selector is specified via one argument that is a function you write, that gets the name of an element we are about to assign to (so, "NAME", "ELEV" or TRAINING" in your example) and the value (as a string) that is about to be assigned to it (so, "MATHER", 12000, "Y", etc in your example). The function then returns 0 or 1 indicating if the selection should be made or not.

    option 1) is simpler and faster, but 2) offers more flexibility (for example, you could select for a range of values with it)

    I suppose, being PL/I, we could offer both 1) and 2) and let you choose which to use for various cases

    But do you have comments or preferencs?
  • Guest
    May 19, 2025
    Would it be ok if we did this only for PARSE(V2)? And as this would be an optional argument and only make sense (we think), it there was a target variable, shouldn't this be an optional 4th argument?