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 COBOL Compilers
Created by Guest
Created on Nov 4, 2020

JSON PARSE error handling messages filter

Cobol Developer coding the JSON parsing and associated Error Handling

For JSON PARSE statement, provide a mechanism for the application code to indicate which JSON-STATUS conditions are acceptable and which are to be considered errors.

Idea priority Medium
  • Guest
    Reply
    |
    Feb 3, 2021

    Hi, you should be able to use the User LE conditional handler as follows:

    You would need to modify line 70 in the example to the message number you encounter.

    001000 identification division.
    001100 program-id. MSGMODH.
    001200*
    001300 environment division.
    001400 configuration section.
    001500 source-computer. zArchitecture
    001600 with debugging mode
    001700 .
    001800*
    001900 data division.
    002000*
    002100 working-storage section.
    002110D77 SEVERITIES pic x(5) value "IWESC".
    002200*
    002300 local-storage section.
    002400 77 error-module pic x(80).
    002410D1 msg-format.
    002420D 2 msg-base.
    002430D 3 facility-id pic x(3).
    002440D 3 msg-no pic 9(4) display.
    002450D 3 severity pic x.
    002460D 2 msgid redefines msg-base pic x(8).
    002500*
    002600 linkage section.
    002700 1 curcond pic x(8).
    002800 COPY IGZIGZCT SUPPRESS.
    002810D1 current-condition redefines curcond.
    002820D 2 case-1.
    002830D 3 severity pic s9(4) comp-5.
    002840D 3 msg-no pic s9(4) comp-5.
    002850D 2 sev-ctl pic x(1).
    002860D 2 facility-id pic x(3).
    002870D 2 i-s-info pic s9(9) comp-5.
    002900
    003000 77 token pic s9(9) comp-5.
    003100
    003200 77 result pic s9(9) comp-5.
    003300 88 PERCOLATE value 20.
    003400
    003500 1 newcond pic x.
    003600/-----------------------------------------------------------------
    003700*
    003800*-----------------------------------------------------------------
    003900 procedure division using
    004000 curcond,
    004100 token,
    004200 result,
    004300 newcond
    004400 .
    004500
    004501* set up condition-name (e.g. CEE3204S) for debugging
    004503D move facility-id of current-condition
    004504D to facility-id of msg-format
    004505D move msg-no of current-condition
    004506D to msg-no of msg-format
    004507D move SEVERITIES(severity of current-condition + 1:1)
    004508D to severity of msg-format
    004510D display "P29589H > " msgid "."
    004520
    004600* if IGZ0276W
    004700 if IGZ08K then
    004800 call "CEE3GRN" using
    004900 error-module
    005000 OMITTED
    005100 display "In module " error-module(1:8)
    005200 end-if
    005300 set PERCOLATE to true
    005400
    005500 goback
    005600 .
    005700 end program MSGMODH.

    Currently the sample percolates (passes control to next condition handler), so the warning message is still produced by the default condition handler.

    If you don't want the message to be surfaced, you need to RESUME the condition. Here's the additional definition required (RESUME is a potential COBOL keyword, hence the -COND added).

    77 result pic s9(9) comp-5.
    88 RESUME-COND value 10.
    88 PERCOLATE-COND value 20.

    if {special-case} then
    .... logic as required ....
    set RESUME-COND to TRUE
    else
    set PERCOLATE-COND to TRUE
    end-if

    It is also required that the code that signaled the special-case condition be able to resume running, which usually means it's an info or warning level condition.

    Please consider using the above sample. Since there is a way to achieve the functionality of this RFE, it is currently being rejected.

  • Guest
    Reply
    |
    Dec 3, 2020

    Hi, we require some more time to triage this RFE.