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 May 8, 2017

Standardize INFDS and Program Status Data Structure with reserved words and constants

Currently all information in Program Status Data Structure and File Information Data structure is accessd by position in the data structure. The naming is done in the program. Individual programmers use various naming conventions or no convention. When one programmer reads the code of another programmer, he nees to go back and forth in the source to make sure that JOBNNAM is really Job Name of the Program Status Data Structure position 244-253. Some positions were given a reserved word, like *STATUS, but they are not usable in the program, and need to be renamed.

With the introduction of Qualified Names, it is possibe to have system standard names, qualified.

In order to make sure it will not contradict with any existing code in the programs , the data structure names will start with an Asteric (*), like must reserved names in RPG. The File Informtion Data Structure will be qualified with the file name.

Example:

*PSDS.JOB_NAM = Job name
*PSDS.PGM_STATUS = Program status.

The different status codes wil have reserved RPG meaningful constants names with an asteric(*) in the begining:

00000 = *STATUS_OK
00001 = *CALLED_PGM_RTNLR
00102 = *STATUS_DIVZERO
00121 = *STATUS_ARRAY_INDEX

As for INFDS - File Information Data Structure:

*INFDS.MYDSPF.CURSOR = Cursor Location (position 370-371 in INFDS of Display Files)
*INFDS.MYDSPF.Function_Key_Pressed = Last Function Key Pressed. (position 369-369 in INFDS of Display Files).

And the function keys itself, no need to copy from somewhere the hex values, Just have RPG Reserved Constants:
*F01 = X'31'
*F02 = X'32'
*HLP = X'F3'

More on Function Keys:
http://www.mcpressonline.com/programming/rpg/retrieve-the-function-key-used-on-a-display-file


Use Case:

The programs will become so much more standardized:

If *PSDS.PGM_STATUS = *STATUS_OK;
if *INFDS.MYDSPF.Function_Key_Pressed = *F02;

Every Programmer will be able to read this code, without searching in the program and in its copy statements to make sure what is the meaning.

Currently there are so many standards in naming. If IBM names it, it will become de-facto standard.

Here are 2 standards of function keys from 2 great programmers, both were published:
http://www.mcpressonline.com/programming/rpg/retrieve-the-function-key-used-on-a-display-file
https://archive.midrange.com/rpg400-l/200509/msg00005.html


Idea priority Low
  • Guest
    Reply
    |
    May 30, 2017

    IBM does not intend to provide a solution to this request at this time, so it is being closed.

  • Guest
    Reply
    |
    May 9, 2017

    See also a similar suggestion that I prposed with Disaply Files:

    https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=100386 - in the comments section.

  • Guest
    Reply
    |
    May 8, 2017

    I voted for this BUT do NOT want the Function key part to be adopted. It would just give programmers too lazy to give names to the function keys another excuse. It doesn not good knowing that F2 was pressed if you don't know what F2 means!!