Skip to Main Content
IBM Z Software


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).


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 PL/I Compilers
Created by Guest
Created on Oct 30, 2018

BY NAME, Mis-Matched Level Numbers

A compiler warning should be issued when there is a level number mis-match on an assignment statement using BY NAME. Currently there is no compile-time notification that there is a problem. We only find out at runtime and only if data conditions exist that would cause problems during unit or system testing. Otherwise, we may not have a runtime problem until sometime in the future when data conditions are right. If we make a mistake like the example below, we can't prevent this code from making it to production.

DCL
1 STRUCT1 UNALIGNED,
2 FIELD1 CHAR(1) INIT('A'),
2 FIELD2 CHAR(1) INIT('B'),
2 SUB_FIELDS_FIELD2,
3 SUB_FIELD1 CHAR(1) INIT('0'),
...
2 FIELD26 CHAR(1) INIT('Z ');

DCL
1 STRUCT2 UNALIGNED,
2 FIELD1 CHAR(1) INIT(' '),
2 FIELD2 CHAR(1) INIT(' '),
2 SUB_FIELD1 CHAR(1) INIT(' ');

STRUCT2 = STRUCT1, BY NAME;

RESULTS:
STRUCT2.FIELD1 = 'A'
STRUCT2.FIELD2 = 'B'
STRUCT2.SUB_FIELD1 = ' '

STRUCT2.SUB_FIELD1 being blank is not the intended result.

Can we get a warning message:
IBMxxxxI W xxx.0 Structure level mismatch in assignment statement.

Idea priority Medium
  • Guest
    Reply
    |
    Dec 8, 2020

    his requirement has been re-assessed.  It is not likely that this will be implemented in the next 12-24 months and so it is being declined at this point. The requirement will be kept in the RFE system and might be reassessed in the future. You also have an opportunity to resubmit in twelve months time if you wish it to be reconsidered then.

  • Guest
    Reply
    |
    Nov 19, 2018

    We all make mistakes, and it's easy enough to issue a message when it sees this and for users to change its severity as they wish

  • Guest
    Reply
    |
    Nov 13, 2018

    What I am saying is, if two field names match between the two structures involved in a BY NAME assignment, but the level numbers of the fields are different, I would like to see a warning/informational message letting me know there is a problem with the level number and the field will not be assigned.

  • Guest
    Reply
    |
    Nov 13, 2018

    Just to make sure I am reading this right: what you would like is: if the compiler finds no match for a target element in a BY NAME assignment, then it checks if there would be a match if children of the source were examined? is this correct?

  • Guest
    Reply
    |
    Nov 7, 2018

    Generally speaking, compilers assist the programmer in his work, when applicable.

  • Guest
    Reply
    |
    Nov 7, 2018

    Generally speaking, compilers assist the programmer in his work, when applicable.

  • Guest
    Reply
    |
    Oct 31, 2018

    If you cannot properly declare matching structures that are going to be used in "BY NAME" assignments, you should use the "RULES(NOBYNAME)" compiler option, yet another option to flag sloppy coding is not a solution.