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.
Another option would be to mimic try-catch:
- presented for discussion, not for beeing a smartass
- i'm not a fan of goto, but error handling in pl/i is hard without it (afaik)
- scope of error condition has to be taken into account, evtl. use "begin-end" to create an suitable scope
What do you think?
dcl c6 char(6);
c6 = '99123';
on error begin;
goto catch;
end;
try:;
c6 = REPATTERN(c6,'YYMMDD','YYDDD');
...operations that depend on a valid date
goto final;
catch:;
..operations that should take place if date is invalid
final:;
...operations that should take place anyway
No other ERROR condition has normal return going back to the failing piece of code, and there is no obvious recovery values to be used here as well (unlike UNDERFLOW for example). The VALIDDATE function could be used to test the date, and if you would a function to test the pattern, please submit a requirement for a VALIDPATTERN function (and we would accept that requirement)
I think a better approach to this "problem" is to validate the date field with builtin function validdate prior to repattern the same date field.