Page 1 of 1

Command to retrieve the dbms name in a cobol program

PostPosted: Thu Feb 07, 2008 4:24 pm
by ToSo7
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

Re: DBMS name

PostPosted: Thu Feb 07, 2008 10:02 pm
by dick scherrer
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.

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

PostPosted: Fri Feb 08, 2008 1:46 pm
by ToSo7
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

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

PostPosted: Sat Feb 09, 2008 12:25 am
by dick scherrer
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?

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

PostPosted: Mon Feb 11, 2008 4:23 pm
by ToSo7
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

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

PostPosted: Mon Feb 11, 2008 9:45 pm
by dick scherrer
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.

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

PostPosted: Tue Feb 12, 2008 3:22 pm
by ToSo7
ok, now i test that solution, tnx for the help and bye :)

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

PostPosted: Tue Feb 12, 2008 8:50 pm
by dick scherrer
You're welcome - good luck :)

d