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 Future consideration
Workspace COBOL Compilers
Categories z/OS
Created by Guest
Created on Mar 14, 2024

JSON PARSE error details

JSON PARSE error handling improvements - Expose Parse messages to application code.

We continue to struggle with problem resolution when specific use cases cause unexpected results from web service calls, resulting in Parse failures. Displaying the payload during error processing is discouraged since it may contain sensitive data that should not be included in job logs. Modifying production source code for problem resolution is discouraged. Reproducing in a test environment is extremely challenging for large applications with many data dependencies.

The WITH DETAIL phrase provides too much detail. ALL Parse messages appear in LEMSG. Many of these are expected conditions in some situations and we would like to suppress them. Displaying all of these messages in job output can be distracting when diagnosing other problems.

When WITH DETAIL is omitted not enough detail is provided. The only indication in the application code is JSON-STATUS and JSON-CODE. These do not provide details such as offset and other message tokens. The messages the application can display are missing these details which causes difficulty in diagnosing problems.


An alternative is needed for application logic to provide more detailed error messages under error conditions (error is determined by the application based on JSON-STATUS and JSON-CODE or other conditions identified by application logic.

Possible solution might be:

WITH DETAIL TO <data-name>

Where <data-name> might be a special register or a user define storage area (declared according to specification).

Additionally, <data-name> could reference a FILE that is open for output. This is less useful, however some customers might find it useful as an option since LEMSG contains more than parse messages.

This would redirect all JSON PARSE messages to program storage instead of LEMSG. The application code could then determine when these might need to be displayed and which messages to display or suppress.


Minimum details needed:

01 MY-JSON-MSG-TBL OCCURS 100 TIMES.

05 JSON-MSG-TXT PIC X(1024). *> Complete text that would be shown in LEMSG

Table would be populated starting from 1 each time JSON PARSE is executed. Application is responsible for capturing messages from prior executions if desired. Application may be responsible for re-init of table prior to any execution. If number of messages exceeds declared occurs, stop writing messages, continue processing (when appropriate). Might need WITH DETAIL TO <data-name> LIMIT <data-name-2>

Next level bonus points:

01 MY-JSON-MSG-TBL OCCURS UNBOUNDED DEPENDING ON JSON-MSG-CNT.

*> JSON-MSG-CNT is probably a special register indicating number of messages written for this parse instance

05 JSON-MSG-ID PIC X(08). *> ex. IGZ0324I

05 JSON-MSG-TXT PIC X(1024). *> Complete text that would be shown in LEMSG

05 JSON-OFFSET PIC 9(9). *> MOST IMPORTANT TOKEN


Extra credit - Possible other details

05 JSON-MSG-TOKENS OCCURS 10 TIMES.

10 JSON-MSG-TOKEN-NAME PIC X(25).

*> ex. JSON-name / JSON-token-found /JSON-tokens-expected

10 JSON-MSG-TOKEN-VALUE PIC X(25).

10 FILLER REDEFINES JSON-MSG-TOKEN.

15 FILLER PIC X(16).

15 JSON-MSG-TOKEN-NUMERIC PIC Z(8)9.

Message tokens can be useful in error handling in application logic. Providing the messages and tokens to the application can enable applications to code better error handling solutions for PARSE conditions. Parsing message text for details is risky since message text can change. Externalizing the token details in explicit variables is helpful.

Idea priority High
  • Admin
    Basil Kanneth
    Reply
    |
    Apr 10, 2024

    We believe this is a valid idea and is being accepted. It will be further updated once put into plan.