Command to retrieve the dbms name in a cobol program



IBM's flagship relational database management system

Command to retrieve the dbms name in a cobol program

Postby ToSo7 » Thu Feb 07, 2008 4:24 pm

HI,
I have necessity of know if there is a command for take the dbms name in a cobol program....
Can you help me please?


Tnx a lot
ToSo7
 
Posts: 4
Joined: Tue Dec 04, 2007 2:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Command to retrieve the dbms name in a cobol program

 

Re: DBMS name

Postby dick scherrer » Thu Feb 07, 2008 10:02 pm

Hello ToSo7 and welcome to the forums,

I have necessity of know if there is a command for take the dbms name in a cobol program....
Your question is not clear. If you post some kind of example, someone may have a suggestion.

Keep in mind that while your questin is completely clear to you, it may not be to others who read it.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Command to retrieve the dbms name in a cobol program

Postby ToSo7 » Fri Feb 08, 2008 1:46 pm

Hi and tnx for welcome :D
sorry but my english isn't perfect,
my question was if i can know the type of dbma that i use in a cobol program (through a sql command)



Tnx for the reply

ToSo
ToSo7
 
Posts: 4
Joined: Tue Dec 04, 2007 2:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Command to retrieve the dbms name in a cobol program

Postby dick scherrer » Sat Feb 09, 2008 12:25 am

Hello,

sorry but my english isn't perfect
Not to worry :)

I'm not aware of an sql query that will return the dbms name/vendor. If there was one, it would probably be vendor specific and would be against the "common" philosophy of sql being vendor independent.

Maybe the ansi standard will be modified to include such a command.

Just curious, but if there is one, how would it be used? What business requirement/solution might be served by having the "dbms name" available via a query?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Command to retrieve the dbms name in a cobol program

Postby ToSo7 » Mon Feb 11, 2008 4:23 pm

Hi and tnx for the reply,
I'm developing a program that runs on many dbms and i need to manage various return codes (different between oracle and DB2 for example).
For this reason i need to know (inside the program) on which DBMS it's running on.

Bye
ToSo7
 
Posts: 4
Joined: Tue Dec 04, 2007 2:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Command to retrieve the dbms name in a cobol program

Postby dick scherrer » Mon Feb 11, 2008 9:45 pm

Hello,

In a few systems where we supported basically the same code on multiple platforms, we included an "environment" table that contained info specific to a particular environment (one bit of info could be which dbms/release). The table name and columns were constant across platforms and was completely under control of the appication.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Command to retrieve the dbms name in a cobol program

Postby ToSo7 » Tue Feb 12, 2008 3:22 pm

ok, now i test that solution, tnx for the help and bye :)
ToSo7
 
Posts: 4
Joined: Tue Dec 04, 2007 2:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Command to retrieve the dbms name in a cobol program

Postby dick scherrer » Tue Feb 12, 2008 8:50 pm

You're welcome - good luck :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post