473,796 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3713
sb****@gmail.co m 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.co m 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.co m 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(Stri ng version)
{
set(1, getDBver_rel()) ;
}
}

--------------- SQL CREATE FUNCTION -------------------
CREATE FUNCTION getDB2Version()
RETURNS VARCHAR(8)
LANGUAGE JAVA
PARAMETER STYLE DB2GENERAL
EXTERNAL NAME 'DB2Version!get Version'
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(Stri ng version)
{
set(1, getDBver_rel()) ;
}
}

--------------- SQL CREATE FUNCTION -------------------
CREATE FUNCTION getDB2Version()
RETURNS VARCHAR(8)
LANGUAGE JAVA
PARAMETER STYLE DB2GENERAL
EXTERNAL NAME 'DB2Version!get Version'
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.syspacka ge

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
3606
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 increment...it's AssemblyInfo.vb looks like this
4
1432
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
1800
by: John | last post by:
Hi How can I change the product version number that is returned by Application.ProductVersion? Thanks Regards
12
4135
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
3546
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 Properties/Version)? Thanks drc
3
2398
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 read the version number, but where to set it? It's probably so obvious that I'm going to feel really dumb! Thanks in advance, Jeff
0
1924
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 the xsl:data-type=number, but that doesn't work. The output of the XML file is exactly what the XML file has and I would like to sort it by the number value. Below is the some of the output from the XML file. <?xml version="1.0"?>...
6
3693
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 reason for this? 65535 would make sense!? Is there a work around, patch, etc?? Regards
14
2270
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. If System.Diagnostics.Debugger.IsAttached = False Then Version.Text = "Version : " & My.Application.Deployment.CurrentVersion.ToString() Else Version.Text = "Debug Mode" End If
0
9529
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10457
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10013
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9054
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.