IBM Support

PH02251: NEW FUNCTION: ADD A NEW PHRASE TO THE JSON PAARSE STATEMENT, NAME IS OMITTED

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as new function.

Error description

  • New function to allow users to parse JSON objects that do not
    have a top level name.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL V6.2 who would     *
    *                 like to use the JSON PARSE statement to      *
    *                 parse JSON text where the text does not      *
    *                 have a top level name.                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: New Function: Customers need the the    *
    *                      ability to parse JSON text into COBOL   *
    *                      data items when the JSON text does not  *
    *                      have a top level name.  This APAR adds  *
    *                      the new keyword OMITTED to the NAME     *
    *                      phrase that enables the JSON PARSE      *
    *                      statement to parse JSON text that is    *
    *                      missing the top level name into the     *
    *                      COBOL data item identified by JSON      *
    *                      PARSE statement identifier-2.           *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF.                      *
    ****************************************************************
    The JSON PARSE statement was unable to parse JSON text that did
    not contain a top level name - the name which would ordinarily
    correspond to the JSON PARSE statement identifier-2.
    

Problem conclusion

Temporary fix

Comments

  • The compiler is changed to add a new keyword to the NAME phrase
    of the JSON PARSE statement.
    
    +--------------------------------------------------------------
    +
    | Start of changes for:
    |
    | Enterprise COBOL for z/OS Language Reference,
    |
    | SC27-8713-01
    |
    
    Chapter 20. PROCEDURE DIVISION statements
    
    Updated the JSON PARSE statement documentation with the
    following changes.
    
    >--+-------------------------------------------------------+->
       |               .-------------------------------------. |
       |               V                                     | |
       '-NAME--+----+----identifier-3--+----+--+-literal-1-+-+-'
               '-OF-'                  '-IS-'  '-OMITTED---'
    
    The OMITTED keyword allows you to parse an anonymous JSON
    object (a JSON object whose top parent name is not specified).
    
    If the OMITTED keyword is specified, then identifier-3 must
    reference identifier-2.
    
    Given the following data description and JSON text:
    
    01. top.
    02. A pic x(20).
    02. B pic x(20).
    
    '{"A": "value1", "B": "value2" }'
    
    One could parse the JSON using this OMITTED keyword:
    
    NAME top IS OMITTED
    
    Without the OMITTED keyword, the JSON would have to contain a
    parent name called "top":
    
    '{ "top": { "A": "value1", "B": "value2" } }'
    
    | End of changes for:
    |
    | Enterprise COBOL for z/OS Language Reference,
    |
    | SC27-8713-01
    |
    +--------------------------------------------------------------
    

APAR Information

  • APAR number

    PH02251

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655EC600

  • Reported release

    620

  • Status

    CLOSED UR1

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-08-28

  • Closed date

    2018-09-20

  • Last modified date

    2018-10-02

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • IGY8CICS IGY8RWRD IGY8RWTU IGYCASMB IGYCCBE  IGYCCCRT IGYCCICS
    IGYCCSRV IGYCDGEN IGYCDIAG IGYCDMAP IGYCEN$0 IGYCEN$1 IGYCEN$2
    IGYCEN$3 IGYCEN$4 IGYCEN$5 IGYCEN$8 IGYCEN$D IGYCEN$R IGYCFGEN
    IGYCFREE IGYCINIT IGYCJA$0 IGYCJA$1 IGYCJA$2 IGYCJA$3 IGYCJA$4
    IGYCJA$5 IGYCJA$8 IGYCJA$D IGYCJA$R IGYCLIBH IGYCLIBO IGYCLIBR
    IGYCLSTR IGYCLVL0 IGYCLVL1 IGYCLVL2 IGYCLVL3 IGYCLVL8 IGYCMALL
    IGYCOPI  IGYCOSCN IGYCPGEN IGYCRCTL IGYCRDPR IGYCRDSC IGYCREAL
    IGYCRWT  IGYCSCAN IGYCSIMD IGYCUE$0 IGYCUE$1 IGYCUE$2 IGYCUE$3
    IGYCUE$4 IGYCUE$5 IGYCUE$8 IGYCUE$D IGYCUE$R IGYCXREF IGYDRV
    IGYEQCWI IGYMSGE  IGYMSGK  IGYMSGT  IGYQCBE  IGYZQDRV IGYZQENU
    IGYZQJPN
    

Publications Referenced
SC27871301    

Fix information

  • Fixed component name

    ENT COBOL FOR Z

  • Fixed component ID

    5655EC600

Applicable component levels

  • R620 PSY UI58632

       UP18/09/27 P F809

  • R621 PSY UI58633

       UP18/09/27 P F809

  • R622 PSY UI58634

       UP18/09/27 P F809

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"620","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
12 December 2023