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 Future consideration
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Jun 10, 2023

Add %OFFSET built-in function to retrieve the position of a Subfield within a Data Structure

Uisng APIs and other interfaces often provides a "Bytes Returned" value. This logical can mean that we can only retrieve data from the returned locations if it was in fact returned by the API. I would like to use something like:

IF (objDesc.bytes_Returned > %OFFSET(OBJDESC : LASTCHGDATE));
// do something here
endif;

 If the subfield is in position 343 in a data structure, then %OFFSET returns 343. RPG IV is a 1's based language, so 0-based results (i.e., 342 in this example) wouldn't be correct.

 

Idea priority Medium
  • Guest
    Reply
    |
    Jul 4, 2023

    Thank you! I fully agree with your recommendations

  • Guest
    Reply
    |
    Jun 13, 2023
    IBM will use this Idea as input to planning, but no commitment is made or implied. This Idea 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 Idea.

    If this Idea is implemented, %OFFSET will return the zero-origin offset of the subfield.

    A %POS built-in function might also be added that would return the 1-origin position of the subfield.

    - IBM Power Systems Development
2 MERGED

New BIF to return position of subfield within a data structure

Merged
I'd like to see a BIF that returns the position of a subfield or nested DS in a data structure. Perhaps something like %pos(<subfield>:<datastructure>) Example: Consider a DS like dcl-ds parm qualified; rtn char(5); rtnMsg char(128); I...
5 months ago in IBM i / Languages - RPG 1 Future consideration