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
Categories Other
Created by Guest
Created on Sep 1, 2016

DFHSC2LS CICS XML Assistant - recognize min/max lengths specified in XSD <pattern> elements

Requesting DFHSC2LS enhancement to recognize min/max lengths specified in XSD <pattern> elements to reduce COBOL copybook lengths.

DFHSC2LS does not recognize min/max length specified in XSD <pattern> elements and generates COBOL copybooks with the DEFAULT-CHAR-MAXLENGTH value (255 if not explicitly specified). This results in unnecessary memory consumption.

An XSD we're using defines a <simpleType> with a <pattern> element that explicitly states min/max length of 3. This <simpleType> is referenced 75 times in the XSD. Based on the COBOL copybook generated using the DEFAULT-CHAR-MAXLENGTH value, 255, each invocation of the XMLTRANSFORM will waste 19K of memory.

To illustrate this, I attached a mock XSD defined with 2 <simpleType> elements. The first <simpleType> is defined with <minLength> and <maxLength> elements. The second is not. Both <simpleType> elements have a <pattern> element showing the min/max lengths.

Below the XSD I attached the generated copybook. The difference between the memory needed when the true max length is used and when the DEFAULT-CHAR-MAXLENGTH is used is 254 bytes per instance taking into consideration the PIC S9999 COMP-5 field for the length and the PIC X(255) for the value.


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="ntrs.com.samplexsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="ntrs.com.samplexsd" elementFormDefault="qualified">
<xs:element name="ResponseMsg" type="LookupResponse"/>
<xs:complexType name="LookupResponse">
<xs:sequence>
<xs:element name="CurrCd1" type="CurrencyCode1"/>
<xs:element name="CurrCd2" type="CurrencyCode2"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="CurrencyCode1">
<xs:restriction base="xs:string">
<xs:minLength value="3"/>
<xs:maxLength value="3"/>
<xs:pattern value="[A-Z]{3,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CurrencyCode2">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{3,3}"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

03 ResponseMsg.
06 CurrCd1 PIC X(3).
06 CurrCd2-length PIC S9999 COMP-5 SYNC.
06 CurrCd2 PIC X(255).

Idea priority Low
  • Guest
    Reply
    |
    Jan 17, 2017

    We have assessed this requirement. We have no current plans for this to be implemented and so this requirement is being declined at this point. The requirement will be kept in the RFE system and might be reassessed in the future. You also have an opportunity to resubmit in twelve months time if you wish it to be reconsidered then.

    A suggestion is to add xsd:maxLength to the WSDL. That's the intended mechanism to set a length in XML Schema, even if length can be inferred through other techniques.