This portal is to open public enhancement requests against IBM Z Software products. 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.
This could be useful in various situations and could make some code not only more readable but also easier and safer to maintain. There are even some declares in the compiler itself that could be better with this. An additional question/suggestion:
this would allow for declares such as
1 x(3) dimacross static
initacross( ('de','germany')
,('fr','france')
,('sp','spain')
)
,2 y char(2)
,2 z char(40) var
;
but the(3) is not really needed - the compiler can figure this out by counting the number of parenthesized lists in the INITACROSS attribute. So this raises a question:
if a DIMENSION attribute has not been specified, but DIMACROSS has been should the compiler infer the DIMENSION attribute? so this would be allowed
1 x dimacross static
initacross( ('de','germany')
,('fr','france')
,('sp','spain')
)
,2 y char(2)
,2 z char(40) var
;
This would make adding a new entry very easy: just insert the values for that entry in INITACROSS and then the compiler will do the rest.
Perhaps the latter version should be the only acceptable use of INITACROSS? then there would be no need to check the number of dimensions from INITACROSS what has been specified somewhere else - and then we could go further and remove even the need for DIMACROSS??
This could be useful in various situations and could make some code not only more readable but also easier and safer to maintain. There are even some declares in the compiler itself that could be better with this
Your understanding is correct, the "initaccross" should do what "dimacross" does for bounds, allowing, as in my example, to keep related values together instead of some screens down.
I think the intent of this feature would be for situations where you had a declare such as
dcl
1 info(2) static,
2 iso char(2) init( 'AT', 'AF' )
2 name char(30) var init( 'Austria', 'Afghanistan' );
which requires that when a new country is added, that the 2 values would have to be inserted in the correct places but possibly far apart.
However, making additions would be much easier if the declare was
dcl
1 info(2) static
INITACROSS( ( 'AT', 'Austria' )
, ( 'AF', 'Afghanistan' )
),
2 iso char(2),
2 name char(30) var;
Robert, please correct me if I have misunderstood the intent of the RFE.
So, it's too hard to understand that the example is just a plastic short-cut for "INITACROSS (('AT', 'Austria'),('AF', 'Afghanistan'), ..., ('ZW',Zimbadwe'))" ? Sigh...
In your use case the "INITACROSS ((ISO, COUNTRY), (ISO, COUNTRY),...)" is a constant value not the real value. Therefore I fail to see the benefit of having the array init with the a value vs init the array with blank . All the real values of iso and corresponding countries have to rely on a source which the values(ISO,COUNTRY) have to be read from into the array.