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 (

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 ( - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal ( - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM. - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Future consideration
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Apr 4, 2019

Expand %XFOOT functionality to include subfields in DS array

I have the following DS / Arrays

dcl-ds Order_Info_t qualified template;
Order like(s1_order);
Order_Pack_Qty like(s1_packqty);
Order_Case_Qty like(s1_packqty);
Order_Weight like(s1_weight);

dcl-ds Order_Summary qualified inz;
Orders like(s1_box);
Order_Info likeds(Order_Info_t) dim(500);

I'm trying to do the following statement to get the total Order_Case_Qty contained within the following array.

SomeVar = %xfoot(Order_Summary.Order_Info.Order_Case_Qty);

I also tried
SomeVar = %xfoot(Order_Summary.Order_Info(*).Order_Case_Qty);

But it appears that %xfoot doesn't allow subfields to be used.

Use Case:

In this case, I'm trying to get the total of all Order_Case_Qty.

This can be accomplished via a FOR or DO loop, but since %xfoot would work if Order_Case_Qty was defined as a stand-alone array, I logically thought it would make sense for it to work as a subfiled within an array data structure.

I believe that if the data structures above were defined as followed, it would work

dcl-ds Order_Info_t qualified template;
Order like(s1_order) dim(500);
Order_Pack_Qty like(s1_packqty) dim(500);
Order_Case_Qty like(s1_packqty) dim(500);
Order_Weight like(s1_weight) dim(500);

dcl-ds Order_Summary qualified inz;
Orders like(s1_box);
Order_Info likeds(Order_Info_t);

But since I didn't think it made sense for me to define my DS / arrays in this fashion, I was hoping that %xfoot would work properly with subfileds in a DS array.

Idea priority Medium
  • Guest
    May 26, 2020

    The CAAC has reviewed this requirement and recommends that IBM view this as a medium priority requirement that should be addressed. With the supported nested data structures, this RFE should be implemented.

    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 RFEs on the broader IBM i community, and has therefore reviewed your RFE.

    For more information about CAAC, see

    For more details about CAAC's role with RFEs, see

    Nancy Uthke-Schmucki - CAAC Program Manager

  • Guest
    Apr 16, 2020

    IBM will use this request as input to planning but no commitment is made or implied. This request will be updated in the future if IBM implements it. IBM will use votes and comments from others in the community to help prioritize this request.

    If this is implemented, it is most likely that %XFOOT(array(*).subfield) would be the supported syntax.

  • Guest
    Apr 17, 2019

    Looking at the request all these days later, I noticed that I misspelled subfield as subfiled (auto-correct?) on two occasions. Should be

    I logically thought it would make sense for it to work as a subfield within an array data structure.
    I was hoping that %xfoot would work properly with subfields in a DS array.