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 19, 2013

Facilitate use of COBOL records in EXEC SQL multi-row operations.

Given a COBOL record like
01 X.
05 Y1 ...
05 Y2 ...
...
in a COPYbook which could be used as a target for a SQL FETCH
(let's say generated by DB2's DCLGEN), we need a mechanism to define an other record like
01 table.
03 X .
05 Y1 occurs 100 times ...
05 Y2 occurs 100 times ...
......
to be appropiate as a target for a SQL multi-row operation - without having to write all the 100 times rows by hand.

It could be something like

01 table ANALOGICAL x OCCURS 100 DIMACROSS-TIMES .

Idea priority High
  • Guest
    Reply
    |
    Dec 8, 2020

    We have looked into this RFE and have determined that this cannot be done as part of the COBOL compiler. It would need to be done via DB2. As a result, can you please open an RFE with the DB2 team via the following link:
    https://ibm-data-and-ai.ideas.aha.io/

    We will be rejecting this RFE from a COBOL point of view. Please let us know if you have any issues opening an Aha request via the above link. Thanks.

  • Guest
    Reply
    |
    Sep 15, 2018

    I suggest to manage the generation of occurs on the elementary variables by adding a statement "SQL TYPE IS ROWSET FOR n ROWS" at the level of the structure including these elementary variables.

    In source before compilation :

    01 X SQL TYPE IS ROWSET FOR 100 ROWS.
    05 Y1 ...
    05 Y2 …

    After pre-compilation :

    01 X .
    05 Y1 … OCCURS 100.
    05 Y2 … OCCURS 100.

  • Guest
    Reply
    |
    Sep 14, 2015

    Due to processing by IBM, this request was reassigned to have the following updated attributes:
    Brand - Servers and Systems Software
    Product family - Programming Languages
    Product - COBOL Compilers

    For recording keeping, the previous attributes were:
    Brand - Rational
    Product family - Design & development
    Product - COBOL Compilers

  • Guest
    Reply
    |
    Dec 7, 2013

    >> multi year strategy. << ? I think that the "dimacross" option should be available _as soon as possible_! We want to tune our applications and using rowset is a big point. But if you show how to code that in cobol today noone wants to think about using it.

    Please think about that point. Thanks.

    PS: Supporting 24 bit (RFE 36563) should have much lower priority!!!

  • Guest
    Reply
    |
    Dec 5, 2013

    This is in-line with our multi year strategy. We will update this request once we plan it for a future compiler version.

  • Guest
    Reply
    |
    Dec 4, 2013

    An explanation to the code of http://www.cps4it.de/wikifiles/Schulungen_cps4it/ROWSET_COBOL_U441RLF.txt. That was the program to test the performance of fetch rowset vs. fetch row. Therefor the different sections and the loops . . .

    Thanks.
    Ralf

  • Guest
    Reply
    |
    Dec 4, 2013

    Hi IBM_Rational_Developer,
    I don't understand your question. It should be clear how to code a sql fetch with rowset. ;-))

    If not - have a look to http://www.cps4it.de/wikifiles/Schulungen_cps4it/ROWSET_COBOL_U441RLF.txt . That's an example I tested at AXA in 2009 / 2010. The code hat both versions of fetching - row and rowset.
    Please have also a look on MR051111354.

    A SQL INSERT works in the same matter.

    The problem is: You can't use DCLGEN for generation the copybook, write a level number above the structure with occurs. Actually you must code the occurs clause for each field seperately. That's crazy!

    Another possibility to look for code is the example in the SQL-Book from IBM. ;-))) That example should work at IBM machines.

    . . . or haven't I understood your question?

  • Guest
    Reply
    |
    Dec 3, 2013

    Hi DieterHarms,

    Can you please explain how users code multi-row fetch with SQL and COBOL today? It would be good to get an example.

    Also, can you please elaborate a bit more on the Use Case ie "All EXEC SQL operations which might become more effective by using multi-row mode." ?

    Thanks.

  • Guest
    Reply
    |
    Nov 27, 2013

    This is a duplicate to GGADL11014 / MR051111354. Title: COBOL: Improved Support for SQLs 'FETCH WITH ROWSET'

    Text in that requirment:
    It's very useful to have an option like DIMACROSS in PL/1 to define the
    OCCURS-clause in the higher leveled variable like:
    05 struc OCCURS n ROWSET.
    10 Field-A pic anything.
    10 Field-B pic anything.
    etc.
    Explanation:
    Fetching DB2 rows with the option "with ROWSET" needs to define the varia
    like e.g.:
    05 struc.
    10 Field-A pic anything OCCURS n.
    10 Field-B pic anything OCCURS n.
    etc.
    To be able to use copybooks for that strukture it's very useful to have an optio
    like DIMACROSS in PL/1 to define the OCCURS-clause in the higher levelle
    variable like:
    05 struc OCCURS n ROWSET.
    10 Field-A pic anything.
    10 Field-B pic anything.
    etc
    In that case it's possible to use a copybook with
    10 Field-A pic anything.
    10 Field-B pic anything.
    etc.
    the option ROWSET writes the variables in that sequence like the definition
    before and the fields of the strukture can easily be used for fetch with rowset.