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 Delivered
Workspace COBOL Compilers
Created by Guest
Created on Mar 5, 2015

Cobol DYNAM subroutines - usage of DSNULI

Currently DB2's Universal Lanugage Interface (DSNULI) is useless for Option-DYNAM-compiled Cobol subroutines. Please make Cobol fully fit for DSNULI.

Local situation:

Many DB2-programs at our site are written in COBOL and are used in TSO/Batch, are used with CAF, in CICS and in DB2-stored procedures. We have many subprograms called by programs in all of our DB2-environments.

In general we compile our COBOL-main- and sub-programs with compiler option DYNAM, which has the effect, that called programs are fetched dynamically. This mechanism also applies to the called DB2-interface!

We have many ?central? subprograms, which are used equally in all of our DB2-Environments. Compiling such a subprogram and choosing a particular ATTACH-precompiler option, the DB2-interface is NOT correct for at least 2 DB2-environments. In our programs we use ATTACH(TSO), which means ? together with the COBOL-compiler-option DYNAM ? that DSNHLI is called dynamically. Using exact this subprogram in CAF (needs DSNALI) or in stored procedures (needs DSNRLI), a wrong DB2-interface is invoked. Please consider, that this problem arises only when using COBOL-option DYNAM, for statically called subprograms and linkedited loadmodules the relevant DB2-interface is supplied by including it or DSNULI at first in the loadmodul.

Potential, available but unsatisfying solutions:

1.) To precompile+compile one and the same subprogram several times for each DB2-environment, where it is needed (arises redundancy and more complex source- and program-management)

2.) To go out of using cobol option DYNAM, so that the calls become static and the subprograms incl. DB2-stubs are included into the loadmodule. This would result in much more complex and error-prone source- and program-management.

Local solution:

We continue to use COBOL compiler option DYNAM, exploiting its benefits.

a) For CAF-mainprograms we load at program-start DSNALI, IDENTifying it as DSNHLI, so that any dynamic call to DSNHLI results in DSNALI being invoked.

b) For stored procedures we prepared a dynamically callable loadmodul named DSNHLI, which dynamically calls DSNHLIR using the same parameters.

Business value of the requested enhancement:

- Transparency in the program source: It becomes visible, that the subprogram might be used in different DB2-environments.

- ?Un-kludge?: It's an official supported feature of the product and avoids bending? of modul-names like in "local solution".

- Usability: It can be used for static and dynamic calls and loadmoduls

- Consistent concept: Dynamic calling of subprograms (faciliated by COBOL option DYNAM) corresponds to the DB2-concept of dynamic package-lists in the DB2-Plan. (In contrast to static Plans + static loadmodules in the past)

Idea priority Medium
  • 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
    |
    Mar 19, 2015

    This can be achieved in Enterprise COBOL V5.2 by compiling with NODYNAM, but using the CALLINTERFACE DYNAM as the first line in the required routines.

    Below is the doc link:
    http://www-01.ibm.com/support/knowledgecenter/SS6SG3_5.2.0/com.ibm.cobol52.ent.doc/PGandLR/ref/rldircal.html?lang=en