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 Submitted
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Nov 18, 2025

VARDIM for RPGLE

Quick explanation.


VARDIM is to DIM what VARCHAR is to CHAR.


Background


Interfacing with RPG complex structures can be done, however the implementations are not homogeneous.


Examples.

  • In IWS you need a pseudo variable suffixed by the array name

  • For DATA-INTO and DATA-GEN you need to explicitly describe metadata information on what the prefix for the the occurrence counter is

  • XML_INTO and XML-GEN has the same issues as DATA-INTO and DATA-GEN. You need to explicitly describe metadata information what the prefix for the occurrence counter is

  • PCML does not have a datatype that describes the variable length of an array, but is separated into the array and the length.

  • Interfacing from other ILE languages does not have direct control of either setting or getting the number of elements.


The idea.


Basically VARDIM is exactly like a VARCHARin the sense that the variable has a predefined integer in front of the actual data, and is supposed to be a datatype of itself.

Example:


Dcl-s myArray varchar(5) vardim(3); 

The memory map for this will be like this:


XXXXYYYYdata1YYYYdata2


Where XXXX is the integer value of 2and YYYY is the integer value of 5


Dcl-s myArray2 varchar(5:4) vardim(3:4); 


The memory map for this will be like this:


XXXXXXXXYYYYYYYYdata1YYYYYYYYdata2


Where XXXXXXXX is the long integer value of 2 and YYYYYYYY is the long integer value of 5



The *AUTO and *VAR are aiming to do what VARDIM is, but will not occur as a separate datatype, that is the point of the Idea.

The current definition of arrays with *AUTO and *VAR is still in action, however the actual occurrence counter is stored in the beginning of the VARDIM itself.

You could also consider that VARDIM is a combination of *AUTO and *VAR and therefore is mutually exclusive.




Implications and benefits


  • PCML need to support that new datatype, however it will not be ambiguous in the interpretations of its usage.

  • IWS - need to support this, however it dont need to produce an extra pseudo variable for this. Also it will be able to expose an array as the root without any object mapper for JSON with extra config in the settings.

  • DATA-INTO,DATA-GEN,XML-INTO, XML-GEN need to support this, but don't need to declare the counter prefix in the parser/generation meta options

  • Consumers and exposers from other ILE languages can with no ambiguity interface with RPG to set or get the correct number of active elements in an array.

  • Also IMHO - it is more consistent with the declaration of variables and structures in RPG.




Idea priority High