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 Languages - RPG
Created by Guest
Created on Jan 19, 2026

Enhance %CHAR or create a new built-in that referrences an array as a character string

RPG IV currently lacks a clean, safe, and expressive way in free-form RPG to treat an array (or a contiguous subset of an array) as a character string. This gap is most visible when attempting to replicate the behavior of the legacy MOVEA opcode, which can move character data into an array or array slice with predictable padding and truncation behavior.

In fully free-form RPG, there is no direct equivalent to MOVEA. While workarounds exist (loops, %SUBST, overlays, pointer-based techniques, or data structures), they are verbose, error-prone, and discourage adoption. As a result, many developers either avoid these patterns entirely or retain legacy fixed-form code solely to preserve MOVEA functionality.

Proposed Enhancement

Enhance the %CHAR built-in function to allow an RPG array (or a range of its elements) to be treated as a contiguous character string target.

Proposed syntax:

%CHAR( myArray [: startElem [: nbrElems ] ] )
  1. myArray - An array of character elements.

  2. startElem (optional) - The starting array element (1-based).

  3. nbrElems (optional) - The number of array elements to include.

This form of %CHAR would present the specified array elements as a single character variable for assignment and manipulation. It should work on the left or right side of the Equals sign on an assignment statement.

In this example:

The string on the right-hand side is copied into myArray, beginning at element 3.

Characters are assigned sequentially across array elements.

Any remaining elements in the referenced range are automatically cleared or padded according to standard RPG character assignment rules.

If the source string exceeds the available array space, normal truncation rules apply.

This mirrors the behavior of MOVEA in this context, but in a modern, free-form, function-based construct.

Behavioral Expectations:

  • Assignment behaves like a character move, not an element-by-element loop.

  • Padding and truncation follow existing RPG character semantics.

  • No undefined behavior or reliance on overlays, pointers, or compiler-dependent tricks.

  • The feature is additive and backward-compatible.

Benefits

  • Enables clean, readable free-form RPG code without reverting to legacy opcodes.

  • Provides a safe and expressive replacement for MOVEA.

  • Reduces boilerplate loops and error-prone "manual" logic.

  • Encourages modernization of existing RPG applications.

  • Aligns with IBM’s ongoing efforts to evolve RPG while preserving its strengths.

Summary

Extending %CHAR to support arrays as contiguous character strings fills a long-standing functional gap in free-format RPG IV. It offers a natural, modern replacement for MOVEA, improves code clarity, and lowers the barrier to fully free-form RPG without introducing new opcodes or breaking existing behavior.

Idea priority High
  • Guest
    Jan 29, 2026
    Thank you for taking the time to submit your Idea. However, This Idea does not align with the strategy for future investment in RPG, so it is being closed.

    The reason that IBM decided not to add MOVEA to the list of operation codes to be used in free-form calculations was that almost every usage of MOVEA was to perform some string manipulation. For example, a common pattern was to use MOVEA from a string to an array, process the array, and then use MOVEA from the array back to the string. This entire pattern could be replaced by a single statement with one or more string built-in functions.

    IBM believes that instead of changing an individual MOVEA operation to a free-form equivalent, it is better to evaluate why the MOVEA operation was being used and replace the MOVEA operation and any related code together, possibly removing the array entirely.

    - IBM Power Systems Development
  • Guest
    Jan 23, 2026

    CONCATARR doesn't apply as it doesn't work on the left-side of the assignment

  • Guest
    Jan 21, 2026

    You almost have what you want using %CONCATARR() and if you need a fragment of the array you could use %SUBARR() to get that