IBM Support

PI26822: DFHJS2LS INCORRECTLY CONVERTS JSON SCHEMA 1 AND 2 DIGIT NUMERIC FIELDS

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • You have a JSON schema which contains fields similar to the
    following
    .
    .
    "test1":{
       "type":"integer",
       "maximum":9,
       "minimum":0
    },
    "test2":{
       "type":"integer",
       "maximum":99,
       "minimum":0
    },
    "test3":{
       "type":"integer",
       "maximum":999,
       "minimum":0
    },
    .
    .
    DFHJS2LS is used to convert the JSON schema into a COBOL
    language structure.  In the resulting COBOL copybook, the
    generated fields end up as
    .
    .
    06 PROGXXXXOperation.
      09 test1                         PIC X DISPLAY.
      09 test2                         PIC X DISPLAY.
      09 test3                         PIC 9(3) DISPLAY.
    .
    .
    Note that fields  test1  and  test2  are generated as PIC X
    instead of PIC 9.
    .
    Additional Symptom(s) Search Keyword(s): KIXREVEPH
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All CICS users.                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: DFHJS2LS generates COBOL language       *
    *                      structures which contain integer fields *
    *                      as alphanumeric characters (indicated   *
    *                      by an X), rather than numerals          *
    *                      (indicated by a 9).                     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The DFHJS2LS assistant is used to convert a JSON schema that
    declares an unsigned integer with a maximum value of 255 or
    less, or an integer with a minimum and maximum in the range of
    -128 to 127 inclusive, to a COBOL copybook.
    Such integers correspond to xsd:unsignedByte and xsd:byte in the
    internal XML mapping, and result in PIC X fields in the
    generated COBOL copybook.  Numeric values in such fields can
    be difficult to work with, and are inconsistent with integers of
    greater ranges which are mapped to PIC 9s.
    

Problem conclusion

  • DFHJS2LS has been modified so that regardless of the
    MAPPING-LEVEL specified, if the INTEGER-AS-PIC9 parameter is
    provided, the generated COBOL language structure will contain
    integer values from the JSON schema as numerals rather than
    alphanumeric characters.
    
    The IBM Knowledge Center, CICS Transaction Server 5.1.0, CICS
    Feature Packs, CICS Transaction Server for z/OS Feature Pack
    for Mobile Extensions V1.0 section will be updated as follows.
    
    The following topics will be modified to include
    INTEGER-AS-PIC9 as a MAPPING-OVERRIDES parameter:
    
    - DFHJS2LS: JSON schema to high-level language conversion
      for linkable interface
    - DFHJS2LS: JSON schema to high-level language conversion
      for request-response services
    - DFHJS2LS: JSON schema to high-level language conversion
      for RESTful services
    
    The INTEGER-AS-PIC9 parameter will have the following
    description:
    
      For COBOL and DFHJS2LS only.  This parameter generates
      language structures which contain integer values from
      the JSON schema as numerals rather than alphanumeric
      characters.
    
    In addition, the table in the JSON schema to COBOL mapping
    topic will be updated as follows.  The row with JSON Schema
    keyword of:
    
      "type"="integer", minimum=0, maximum=255
      or
      "type":"integer", minimum:-128, maximum:127
    
    will be replaced by two new rows.  The first of which will have
    a JSON Schema keyword of:
    
      "type"="integer", minimum=0, maximum=255
    
    and COBOL data description of:
    
      PIC X DISPLAY
    
      Unless, the INTEGER-AS-PIC9 parameter is specified, in which
      case:
    
      PIC 9(z) COMP-5 SYNC
      or
      PIC 9(z) DISPLAY
      where 10(z-1) < m <= 10z
    
    The second new row will have a JSON Schema keyword of:
    
      "type":"integer", minimum:-128, maximum:127
    
    and COBOL data description of:
    
      PIC X DISPLAY
    
      Unless, the INTEGER-AS-PIC9 parameter is specified, in which
      case:
    
      PIC S9(z) COMP-5 SYNC
      or
      PIC S9(z) DISPLAY
      where 10(z-1) < m <= 10z
    
    The CICS Transaction Server for z/OS Version 5 Release 2 Web
    Services Guide (SC34-7301-00) will be updated as follows.  In
    Chapter 8.  Creating a JSON web service, the following topics
    will be updated to include INTEGER-AS-PIC9 as a
    MAPPING-OVERRIDES parameter:
    
    - DFHJS2LS: JSON schema to high-level language conversion
      for request-response services
    - DFHJS2LS: JSON schema to high-level language conversion
      for RESTful services
    
    The INTEGER-AS-PIC9 parameter will have the following
    description:
    
    For COBOL and DFHJS2LS only.  This parameter generates language
    structures which contain integer values from the JSON schema as
    numerals rather than alphanumeric characters.
    
    The CICS Transaction Server for z/OS Version 5 Release 2
    Application Programming Guide (SC34-7266-00) will also be
    updated as above, in Chapter 20. Mapping and transforming
    application data and JSON, topic DFHJS2LS: JSON schema to
    high-level language conversion for linkable interface.
    
    Also in Chapter 20, the table in topic JSON schema to COBOL
    mapping will be modified as follows:
    
    For JSON Schema keyword values of:
    
      "type"="integer",
      minimum=0,
      maximum=255
    
    and
    
      "type":"integer",
      minimum:-128,
      maximum:127
    
    the COBOL data description will indicate that the resulting
    COBOL representation for mapping level 4.0 and above, also
    applies when the INTEGER-AS-PIC9 parameter has been
    specified regardless of the mapping level.
    

Temporary fix

  • FIX AVAILABLE BY PTF ONLY
    

Comments

APAR Information

  • APAR number

    PI26822

  • Reported component name

    CTS MOBILE EXTN

  • Reported component ID

    5655Y4800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2014-10-01

  • Closed date

    2015-01-29

  • Last modified date

    2015-03-06

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

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

    UI24769 UI24770

Modules/Macros

  • DFJ@H176
    

Publications Referenced
SC34730100SC34726600   

Fix information

  • Fixed component name

    CICS TS Z/OS V5

  • Fixed component ID

    5655Y0400

Applicable component levels

  • R80D PSY UI24769

       UP15/02/05 P F502

  • R90D PSY UI24770

       UP15/02/05 P F502

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":"SSGMGV","label":"CICS Transaction Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"5.1","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
22 July 2020