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 Delivered
Workspace z/OS Connect
Created by Guest
Created on Sep 15, 2022

Full ARRAY and STRUCT support in IMS Database Service Provider

We require IMS Database Service Provider services to support complex segments with (non-nested) ARRAY fields with many instances and many values per instance (which may be of different data types), using un-flattened array representation, with automatic discovery of ARRAY metadata and automatic retrieval of ARRAY contents, without any additional knowledge beyond the ARRAY name provided as part of an SQL query.


Example:

Given an IMS database WMGAT containing an ARRAY field named GD791 with 5 subfields GD791A, GD791B and GD791C the following query will return all instances of all subfields of the array from a segment or segments matching conditions of the WHERE clause:


SELECT GZ.GD791 FROM WMGAT.GR, WMGAT.GT, WMGAT.GZ WHERE GR.ISIN = ? AND GR.GRAG = '9' AND GR.GRBID = '000000000000' AND GT.GTTART = 'V' AND GT.GTID = 'GD791'


The service interface JSON will only contain one section per subfield (not per instance, as with the current approach):


<field name="GD791" originalName="GD791" included="Y" path="response.GD791">

<startPos>0</startPos>

<bytes>24</bytes>

<maxBytes>24</maxBytes>

<applicationDatatype datatype="ARRAY"/>

<field name="GD791A" originalName="GD791A" included="Y" path="response.GD791A">

<startPos>0</startPos>

<bytes>4</bytes>

<maxBytes>4</maxBytes>

<applicationDatatype datatype="INT" precision="4" scale="0"/>

</field>

<field name="GD791B" originalName="GD791B" included="Y" path="response.GD791B">

<startPos>4</startPos>

<bytes>4</bytes>

<maxBytes>4</maxBytes>

<applicationDatatype datatype="INT" precision="4" scale="0"/>

</field>

<field name="GD791C" originalName="GD791C" included="Y" path="response.GD791C">

<startPos>8</startPos>

<bytes>16</bytes>

<maxBytes>16</maxBytes>

<applicationDatatype datatype="CHAR"/>

</field>

</field>


Ideally STRUCT fields will be similarly supported as they are compareable to ARRAY fields with just one single instance.


For ARRAY fields it would be nice to have an option to limit the number of array instances returned in the JSON output …for instance return up to 10 instance even if the ARRAY field may contain for instance up to 100 – so something similar to what the FETCH FIRST x ROW(S) ONLY clause does for the amount of rows being returned.


Last but not least it would be also nice if the IMS DB service provider could handle ARRAYs spanned accross multiple segments. This could be done for instance by a selectable option "combine array instances from all result set rows to a single array". This would require to limit the SELECT list to either just the ARRAY field or besides the array field only fields from higher-level segments and to limit the result set to return only multiple segments of the segment type containing the array but just one single parent segment respectively a single path of parent segments (in the sample above just the same GR and GT segment for all GZ segments, which is in the sample ensured by specifying the full keys of the GR segment and the GT segment in all their parts in the WHERE clause*). This limitation is something you may just document and the user needs to ensure to take care of.


*the IMS JDBC driver combines the key subfields of the keys during the query execution

Idea priority High
  • Admin
    Demelza Farrer
    Reply
    |
    Apr 30, 2024

    This requirement is addressed by z/OS Connect 3.0.80 / APAR PH51864:

    https://www.ibm.com/support/pages/apar/PH51864


  • Admin
    Demelza Farrer
    Reply
    |
    Nov 2, 2022

    Thank you for this IDEA.
    This requirement is "under consideration" for Structs and Arrays but will not consider either nested array support or support for arrays that span segments.