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
Categories Toolkit
Created by Guest
Created on May 9, 2016

Structured Programming Macros: support parenthetical grouping of logical conditions via parentheses

Support for parenthetical grouping of logical conditions is currently only possible by using the ANDIF and ORIF operators. This is because the Structured Programming Macros do not support the use of parentheses to specify logical hierarchy of conditions. Parentheses would be the much preferred syntax in such cases.

For example, rather than coding this:

IF LTR,R1,R1,NZ, +
AND, +
LTR,R2,R2,NZ, +
ORIF, +
LTR,R3,R3,NZ, +
AND, +
LTR,R4,R4,NZ

we would much rather code it this way:

IF ((LTR,R1,R1,NZ), +
AND, +
(LTR,R2,R2,NZ)), +
OR, +
((LTR,R3,R3,NZ), +
AND, +
(LTR,R4,R4,NZ))

We would be more than happy to supply the additional parentheses to specify the logical groupings (instead of using ANDIF/ORIF).

Idea priority Medium
  • Guest
    Reply
    |
    Sep 28, 2020

    We feel that the current structured programming macros have evolved into a new language which has become quite complex and confusing. Although the structured programming macros greatly improve readability and productivity for simple cases, in more complex cases they can become difficult to understand and quite error-prone, for example because of layout problems with indentation and parentheses.

    Clearly if we were re-inventing these macros from scratch, it would have been better to follow the usual high-level language conventions, but we are concerned that introducing the new high-level language scheme as an alternative could actually increase confusion, especially when working with existing code, and it would also require a lot of implementation work and testing.

    We were previously sent two alternative implementations which included support for this requirement, but in both cases there were so many other changes that we could not use them as is, and we found bugs and incompatibilities which would have needed further investigation, so we could not even use those implementations without a lot of additional work.

    Another problem is that the existing macros do not make it practical to include additional instructions such as loads or subroutine calls while evaluating a condition. Even if more complex condition expressions were supported, this restriction would make it difficult to exploit them. And it is not very tidy having to code instructions within operands anyway.

    We are currently considering alternative ways to extend the macros, for example allowing additional conditions to be evaluated using sequences of ordinary instructions separated by macros to combine conditions. We are therefore declining this request at this time. However, if these alternative ways prove impractical, we may well reconsider this request in future.

    In the meantime, we understand that the documentation for how to use the existing AND, OR, ANDIF and ORIF conditions needs to be clarified, and some suggested improvements for the relevant topics are being passed on to the writers.

    Jonathan Scott, HLASM and Toolkit