473,322 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Get the DB2 version number through SQL (onMVS)

Hi,
who could tell me if there is a SYSIBM table that would give me the
current db2 version accessed (on MVS) - i.e. Oracle offers a v$version
system table that gives that information.
Thanks
Jean-Louis

Nov 12 '05 #1
4 3693
sb****@gmail.com wrote:
Hi,
who could tell me if there is a SYSIBM table that would give me the
current db2 version accessed (on MVS) - i.e. Oracle offers a v$version
system table that gives that information.


My very first idea would be to implement a user-defined function (in Java or
C) to access the DBINFO structure and return the version information
available there.

--
Knut Stolze
Information Integration Development
IBM Germany / University of Jena
Nov 12 '05 #2
sb****@gmail.com wrote:
Hi,
who could tell me if there is a SYSIBM table that would give me the
current db2 version accessed (on MVS) - i.e. Oracle offers a v$version
system table that gives that information.
Thanks
Jean-Louis

Take a look in the sqludf include file.
The dbinfo structure has a ver_rel attribute.
It should be available on all platforms
You can write an external UDF which grabs the result.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #3
Serge Rielau wrote:
sb****@gmail.com wrote:
Hi,
who could tell me if there is a SYSIBM table that would give me the
current db2 version accessed (on MVS) - i.e. Oracle offers a v$version
system table that gives that information.
Thanks
Jean-Louis

Take a look in the sqludf include file.
The dbinfo structure has a ver_rel attribute.
It should be available on all platforms
You can write an external UDF which grabs the result.


The following (untested code) should work, at least on LUW. But I'd be a
bit surprised if it would not work on zOS or MVS.

--------------- Java code -------------------
public class extends DB2Version extends COM.ibm.db2.app.UDF
{
public void getVersion(String version)
{
set(1, getDBver_rel());
}
}

--------------- SQL CREATE FUNCTION -------------------
CREATE FUNCTION getDB2Version()
RETURNS VARCHAR(8)
LANGUAGE JAVA
PARAMETER STYLE DB2GENERAL
EXTERNAL NAME 'DB2Version!getVersion'
DETERMINISTIC
NO EXTERNAL ACTION
DBINFO
@

--
Knut Stolze
Information Integration Development
IBM Germany / University of Jena
Nov 12 '05 #4
Knut Stolze wrote:
Serge Rielau wrote:

sb****@gmail.com wrote:
Hi,
who could tell me if there is a SYSIBM table that would give me the
current db2 version accessed (on MVS) - i.e. Oracle offers a v$version
system table that gives that information.
Thanks
Jean-Louis


Take a look in the sqludf include file.
The dbinfo structure has a ver_rel attribute.
It should be available on all platforms
You can write an external UDF which grabs the result.

The following (untested code) should work, at least on LUW. But I'd be a
bit surprised if it would not work on zOS or MVS.

--------------- Java code -------------------
public class extends DB2Version extends COM.ibm.db2.app.UDF
{
public void getVersion(String version)
{
set(1, getDBver_rel());
}
}

--------------- SQL CREATE FUNCTION -------------------
CREATE FUNCTION getDB2Version()
RETURNS VARCHAR(8)
LANGUAGE JAVA
PARAMETER STYLE DB2GENERAL
EXTERNAL NAME 'DB2Version!getVersion'
DETERMINISTIC
NO EXTERNAL ACTION
DBINFO
@

The closest you can get as far as I know is:
select distinct relbound from sysibm.sysplan
or from sysibm.syspackage

It wil show a 'K' for plans/packages that are bound on DB2 Version 7 and
a blank for plans/packages that are bound prior to V7.
(not sure what it will show for V8, 'L' perhaps?)

The DB2 version is also shown if you connect from Windows via the
command line processor via DB2 Connect to the MVS subsystem:

Database Connection Information

Database server = DB2 OS/390 7.1.1

--
Anton Versteeg
IBM Netherlands
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: mekim | last post by:
Hello....I am trying to System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version.ToString () ; to display the version of the app...but it remains static and therefore does not...
4
by: John | last post by:
Hi Is there a way to get the version number of my vb.net app, that is provided by vs? Thanks Regards
8
by: John | last post by:
Hi How can I change the product version number that is returned by Application.ProductVersion? Thanks Regards
12
by: joanne | last post by:
how to tell application version after i installed it at client side? i did make the version and product code while doing the packaging and deployment. Thanks a lot.
4
by: Dave Cullen | last post by:
Where in a VB.NET project do you get to set the version properties of your executable? Version number, Copyright, biuld comments, etc (the stuff that shows up when you right-click...
3
by: Jeff | last post by:
I've been looking and looking for how to set the version numbers for my visual studio project...where the heck is it? Used to be able to do it from project properties in VB6. I found out how to...
0
by: ev951 | last post by:
I am not that familiar with XML or XSL and I am trying to sort application version number strings in an XML file that my team uses for application installations on our Linux servers. I have tried...
6
by: Gavin Sullivan | last post by:
I've been using the date (in YMMDD) format for the build number in the AssemblyVersion attribute. However, it appears that numbers 65534 are invalid!! Bit of a bummer for 2007!!! Is there a...
14
by: Phil | last post by:
I have been using this code to display the version number, and this has worked well, but I am now changing from using the ClickOnce publishing to a proper setup project, and this no longer works. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.