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 Feb 15, 2018

Error handling for REPATTERN

The REPATTERN builtin function throws the ERROR condition when date format errors occur. Current ON ERROR processing requires a GOTO to be used to handle the error. Would prefer that the ON ERROR unit support a normal return to the instruction immediately following the REPATTERN call in error to allow a more structured program model.

Idea priority Low
  • Guest
    Reply
    |
    Feb 28, 2018

    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

  • Guest
    Reply
    |
    Feb 22, 2018

    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)

  • Guest
    Reply
    |
    Feb 16, 2018

    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.