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).
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:
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 an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
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.
The
constkeyword prevents initialized variables from being modified upon activation. This allows for a private variable that can be modified in the exporting module but is read-only upon import.Currently, the workaround is to create a standard global variable and a getter procedure. This works correctly, but I believe the
IMPORTsyntax is used less frequently due to its mutability.- Ismael Martínez
Thank you for taking the time to submit this IBM Idea and share your feedback with IBM and the broader IBM i community.
The CAAC has reviewed this Idea and, after careful consideration, does not recommend that IBM move forward with the request in its current form at this time.
Reason: The CAAC does not recommend introducing another form of exported global variable because globally accessible values can create hidden dependencies and make applications more difficult to understand, maintain, and support. Existing RPG design patterns provide clearer encapsulation for this requirement. A constant can be used when the value does not change, while an exported getter procedure backed by an internal static value can be used when the value must be established at runtime. This approach keeps access to the value controlled and the underlying implementation contained within its compilation unit.
Although the CAAC is not recommending implementation of this request, Ideas such as this help IBM and the CAAC better understand the needs and priorities of the IBM i community. We appreciate your contribution and encourage you to continue submitting IBM Ideas and sharing your feedback.
Background: The COMMON Americas Advisory Council (CAAC) includes members with a broad range of experience working with small and medium-sized IBM i clients. The CAAC works with IBM i development to help assess the potential value and impact of individual IBM Ideas on the broader IBM i community.
For more information on the CAAC, visit: https://www.common.org/common-americas-advisory-council/
Brandon Pederson - CAAC Program Manager
Portal Public
IBM needs more information to further assess your Idea.
Would an RPG-only solution be acceptable for this Idea? The RPG compiler could allow the CONST keyword with the IMPORT keyword. That way, only the module with the EXPORT keyword could modify the variable.
In your /COPY file:
dcl-s shared_fld int(10)
/if defined(export_shared_fld)
export
/else
import const
/endif
;