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.
Due to processing by IBM, this request was reassigned to have the following updated attributes:
Brand - Servers and Systems Software
Product family - Programming Languages
Product - Business Developer
For recording keeping, the previous attributes were:
Brand - Rational
Product family - Design & development
Product - Business Developer
The argument that a character variable always has a length is not relevant for this RFE. As already stated, string variables can be empty and have zero length. This RFE is about EGL substrings in general, regardless whether source or target is a string or char variable. The two types can be assigned to each other anyway and the type will be cast automatically.
Currently, the runtime exception is thrown even when both source and target is a string variable. That makes no sense. When the target is a char variable and the result is shorter, it will be padded with blanks automatically, so that can be done even when the substring length is zero, in which case the target char variable will become all blanks.
Of course the current restriction can be circumvented by coding a substring function, but that would have a much bigger performance impact than just an extra if statement in the generated COBOL code, which would only be needed when any of the substring indices is variable.
Java and JavaScript already support zero length (sub)strings, so in those environments there should not be any performance impact.
This has been reviewed by development and the request is being rejected. For a Character variable, it will always have a length as there is no such thing in EGL as an empty character field. It may have a value of all blanks, but it still has its defined length. String datatypes can be empty and have zero length.
As a potential workaround, it is felt that a function could be written when needed to check the lengths and return the desired values. Loose typing is available for CHARs or it could use Strings. The use of the .bytes function for a character field could also be used. For assistance on a possible workaround, please work with your contact in EGL development.