Skip to Main Content
IBM Data and AI Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. 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

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea


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.

IBM Employees should enter Ideas at https://ideas.ibm.com


Status Not under consideration
Workspace Db2 for z/OS
Created by Guest
Created on Apr 22, 2019

new DB2 SQL/DDL > DECLARE (GLOBAL) TEMPORARY VARIABLE

Db2 v11 introduced CREATE VARIABLE.  pretty handy... but it must be created in advance.

 

How about a dynamic SQL/DDL equivalent?

DECLARE TEMPORARY VARIABLE xyx 

OR 

DECLARE GLOBAL TEMPORARY VARIABLE xyz

 

It would be useful for anyone (ie. the same people who can use DGTT today) to declare their own variables temporary usage.

And then after usage (after commit or at end of connection) the temporary variable can disappear.

 

This would allow us to have complex SQL scripts with multiple SQL statements where each SQL can each reference the temp variable.

> the temp variable could be ta timestamp or userid or anything that you need to reference in multiple upcoming SQL

 

I also think the SQL script would be more clean and easy to read.  You can change or set the variable once and it will be reflected in all upcoming usage in the subsequent SQL. 

You would not run the risk of needing to reset the value and find/replace in all the subsequent SQL... and missing the value in one place (what a pain)

 

And yes.. I do have a work around today. It is tedious but it works.

I tell my advanced SQL creatros to consider using DGTT with one column and one row.   They can then reference the DGTT in the subsequent SQL with a SELECT from the DGTT every time they need the one row variable!  This is not the most pretty but it is an option today.

 

 

 

 

  • Admin
    Janet Figone
    Reply
    |
    May 13, 2019

    Thank you for submitting this Db2 for z/OS enhancement request.

    After giving the request a comprehensive review, we have determined that we cannot include it as a candidate in an upcoming product deliverable because it is not consistent with the product direction that the Db2 family is pursuing.

    As a consequence we will not be implementing this request.

    We appreciate your input to the Db2 for z/OS development team.  We also hope that you will continue to submit ideas for improvements as customer feedback is a key component  to shaping the future direction of Db2 for z/OS. 

    Sincerely,

    Db2 for z/OS Team