Addressing the DB2 RIB from REXX

Mick Graley

Addressing the DB2 RIB from REXX
Hi All,

Does anybody know if it is possible to address the DB2 RIB from a REXX program
connected via DSNREXX?

Cheers,

Mick.


___________________________________________________________

Tiscali Broadband only 9.99 a month for your first 3 months!
http://www.tiscali.co.uk/products/broadband/

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

James Campbell

Re: Addressing the DB2 RIB from REXX
(in response to Mick Graley)
Well I presume it's loaded somewhere under the user's TCB - so it's simply
a matter of following the CDE chain looking for an associated LLE for
DSNARIB.

However, what's in it that you want? If it's just the DB2 VRM, an SQL
CONNECT (without parameters) will give you that.

James Campbell

On 18 Jan 2007 at 13:40, Mick Graley wrote:

> Hi All,
>
> Does anybody know if it is possible to address the DB2 RIB from a REXX program
> connected via DSNREXX?
>
> Cheers,
>
> Mick.
>
>
> ___________________________________________________________
>
> Tiscali Broadband only 9.99 a month for your first 3 months!
> http://www.tiscali.co.uk/products/broadband/
>
> ---------------------------------------------------------------------------------
> Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Mick Graley

Re: Addressing the DB2 RIB from REXX
(in response to James Campbell)
Hi James,

Yeah I'm just looking for the DB2 version of specific sub-systems. We have
LOTS of SAP systems split between V7 and V8 and we currently get the
version using CAF from an assembler program but it would be handy to be
able to do this from REXX. I can't find this functionality of DSNREXX in
the V7 programming guide. Do you have an example?

Cheers,

Mick.


On Fri, 19 Jan 2007 12:34:21 +1100, James Campbell
<[login to unmask email]> wrote:

>Well I presume it's loaded somewhere under the user's TCB - so it's simply
>a matter of following the CDE chain looking for an associated LLE for
>DSNARIB.
>
>However, what's in it that you want? If it's just the DB2 VRM, an SQL
>CONNECT (without parameters) will give you that.
>
>James Campbell
>
>On 18 Jan 2007 at 13:40, Mick Graley wrote:
>
>> Hi All,
>>
>> Does anybody know if it is possible to address the DB2 RIB from a REXX
program
>> connected via DSNREXX?
>>
>> Cheers,
>>
>> Mick.
>>
>>
>> ___________________________________________________________
>>
>> Tiscali Broadband only 9.99 a month for your first 3 months!
>> http://www.tiscali.co.uk/products/broadband/
>>
>> ------------------------------------------------------------------------
---------
>> Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm
>
>--------------------------------------------------------------------------
-------
>Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

James Campbell

Re: Addressing the DB2 RIB from REXX
(in response to Mick Graley)
http://publibz.boulder.ibm.com/cgi-
bin/bookmgr_OS390/BOOKS/DSNAPH14/2.4.6

A sample program

http://publibz.boulder.ibm.com/cgi-
bin/bookmgr_OS390/BOOKS/DSNAPH14/APPENDIX1.4.3

The tyep of code you need

ADDRESS DSNREXX "EXECSQL CONNECT"
if substr(sqlerrp,1,3) /= 'DSN' then
do
say "Error. SQLERRP="SQLERRP ||,
" - This is not DB2 for OS/390 or z/OS"
exit 8
end
if substr(sqlerrp,4,2) < '06' then
do
say "Error. SQLERRP="SQLERRP" - this is prior to V6"
exit 8
end

Well, the program I snipped this from only works on V6+ - hence the error.
But it shows the DB2 Version number. The SQL Reference manual has the
rest of the format of SQLERRP.

James Campbell

On 22 Jan 2007 at 17:10, Mick Graley wrote:

> Hi James,
>
> Yeah I'm just looking for the DB2 version of specific sub-systems. We have
> LOTS of SAP systems split between V7 and V8 and we currently get the
> version using CAF from an assembler program but it would be handy to be
> able to do this from REXX. I can't find this functionality of DSNREXX in
> the V7 programming guide. Do you have an example?
>
> Cheers,
>
> Mick.
>
>

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Steve Tennant

Re: Addressing the DB2 RIB from REXX
(in response to James Campbell)
Hi Mick,
try this....
/* REXX RETRIEVE DB2 VER.REL */

PARSE UPPER ARG SSN
IF ' '||SSN= ' ' THEN SSN=xxxx
ADDRESS TSO "SUBCOM DSNREXX"
IF RC <> 0 THEN
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX
"CONNECT "SSN
IF SQLCODE ¬= 0 THEN SAY 'ADDRESS FAILED'
ADDRESS DSNREXX "EXECSQL CONNECT"
DB2V = SUBSTR(SQLERRP,4,2)
DB2R = SUBSTR(SQLERRP,6,2)
SAY 'DB2 VER:' DB2V'.'DB2R
RETURN

Change the xxxx to your default subsystem ID.
I can't remember where I filched this from so I can't give an attribution
:-)

Regards,

Steve T

-----Original Message-----
From: Mick Graley [mailto:[login to unmask email]
Sent: Tuesday, 23 January 2007 10:10
To: [login to unmask email]
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi James,

Yeah I'm just looking for the DB2 version of specific sub-systems. We have
LOTS of SAP systems split between V7 and V8 and we currently get the
version using CAF from an assembler program but it would be handy to be
able to do this from REXX. I can't find this functionality of DSNREXX in
the V7 programming guide. Do you have an example?

Cheers,

Mick.


On Fri, 19 Jan 2007 12:34:21 +1100, James Campbell
<[login to unmask email]> wrote:

>Well I presume it's loaded somewhere under the user's TCB - so it's simply
>a matter of following the CDE chain looking for an associated LLE for
>DSNARIB.
>
>However, what's in it that you want? If it's just the DB2 VRM, an SQL
>CONNECT (without parameters) will give you that.
>
>James Campbell
>
>On 18 Jan 2007 at 13:40, Mick Graley wrote:
>
>> Hi All,
>>
>> Does anybody know if it is possible to address the DB2 RIB from a REXX
program
>> connected via DSNREXX?
>>
>> Cheers,
>>
>> Mick.
>>
>>
>> ___________________________________________________________
>>
>> Tiscali Broadband only 9.99 a month for your first 3 months!
>> http://www.tiscali.co.uk/products/broadband/
>>
>> ------------------------------------------------------------------------
---------
>> Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm
>
>--------------------------------------------------------------------------
-------
>Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

************************************************************************
IMPORTANT:

* This transmission is intended for the use of the addressee only and might contain sensitive or legally privileged information. If you are NOT the intended recipient, you are notified that any use or dissemination of this communication is strictly prohibited. If you receive this transmission in error, please notify the author immediately by telephone and delete all copies of this transmission together with any attachments.

* The Australian Customs Service DOES NOT AUTHORISE the recipient to further disclose this email or its contents without permission of the originator.

* Unsolicited commercial emails MUST NOT be forwarded to the originator of this transmission unless prior consent has been given.


***********************************************************************

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Mick Graley

Re: Addressing the DB2 RIB from REXX
(in response to Steve Tennant)
Hi Steve (and James),

Thanks! That's exactly what I was looking for and it works great on V7 and
V8.
Interestingly enough I couldn't find this functionality of the sequence:
"CONNECT" SSN; "EXECSQL CONNECT"
documented in the programming guide or the example program.
If IBM are listening please document this!

Thanks again chaps.

Mick.


----- Original Message -----
From: <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Wednesday, January 24, 2007 2:59 AM
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi Mick,
try this....
/* REXX RETRIEVE DB2 VER.REL */

PARSE UPPER ARG SSN
IF ' '||SSN= ' ' THEN SSN=xxxx
ADDRESS TSO "SUBCOM DSNREXX"
IF RC <> 0 THEN
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX
"CONNECT "SSN
IF SQLCODE ¬= 0 THEN SAY 'ADDRESS FAILED'
ADDRESS DSNREXX "EXECSQL CONNECT"
DB2V = SUBSTR(SQLERRP,4,2)
DB2R = SUBSTR(SQLERRP,6,2)
SAY 'DB2 VER:' DB2V'.'DB2R
RETURN

Change the xxxx to your default subsystem ID.
I can't remember where I filched this from so I can't give an attribution
:-)

Regards,

Steve T

-----Original Message-----
From: Mick Graley [mailto:[login to unmask email]
Sent: Tuesday, 23 January 2007 10:10
To: [login to unmask email]
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi James,

Yeah I'm just looking for the DB2 version of specific sub-systems. We have
LOTS of SAP systems split between V7 and V8 and we currently get the
version using CAF from an assembler program but it would be handy to be
able to do this from REXX. I can't find this functionality of DSNREXX in
the V7 programming guide. Do you have an example?

Cheers,

Mick.


On Fri, 19 Jan 2007 12:34:21 +1100, James Campbell
<[login to unmask email]> wrote:

>Well I presume it's loaded somewhere under the user's TCB - so it's simply
>a matter of following the CDE chain looking for an associated LLE for
>DSNARIB.
>
>However, what's in it that you want? If it's just the DB2 VRM, an SQL
>CONNECT (without parameters) will give you that.
>
>James Campbell
>
>On 18 Jan 2007 at 13:40, Mick Graley wrote:
>
>> Hi All,
>>
>> Does anybody know if it is possible to address the DB2 RIB from a REXX
program
>> connected via DSNREXX?
>>
>> Cheers,
>>
>> Mick.
>>
>>
>> ___________________________________________________________
>>
>> Tiscali Broadband only 9.99 a month for your first 3 months!
>> http://www.tiscali.co.uk/products/broadband/
>>
>> ------------------------------------------------------------------------
---------
>> Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm
>
>--------------------------------------------------------------------------
-------
>Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

************************************************************************
IMPORTANT:

* This transmission is intended for the use of the addressee only and might
contain sensitive or legally privileged information. If you are NOT the
intended recipient, you are notified that any use or dissemination of this
communication is strictly prohibited. If you receive this transmission in
error, please notify the author immediately by telephone and delete all
copies of this transmission together with any attachments.

* The Australian Customs Service DOES NOT AUTHORISE the recipient to further
disclose this email or its contents without permission of the originator.

* Unsolicited commercial emails MUST NOT be forwarded to the originator of
this transmission unless prior consent has been given.


***********************************************************************

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.10/651 - Release Date: 24/01/2007
18:48

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Steve Tennant

Re: Addressing the DB2 RIB from REXX
(in response to Mick Graley)
Mick,
the CONNECT you see follows the ADDRESS to DSNREXX, if you looking the
Application Programming & SQL Guide in section 2.4.6.3 you will see the
documentation. In fact the parent section 2.4.6 has all the bits you need
and some good examples.

Have fun.

Steve T



-----Original Message-----
From: Mick Graley [mailto:[login to unmask email]
Sent: Thursday, 25 January 2007 10:23
To: [login to unmask email]
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi Steve (and James),

Thanks! That's exactly what I was looking for and it works great on V7 and
V8.
Interestingly enough I couldn't find this functionality of the sequence:
"CONNECT" SSN; "EXECSQL CONNECT"
documented in the programming guide or the example program.
If IBM are listening please document this!

Thanks again chaps.

Mick.


----- Original Message -----
From: <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Wednesday, January 24, 2007 2:59 AM
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi Mick,
try this....
/* REXX RETRIEVE DB2 VER.REL */

PARSE UPPER ARG SSN
IF ' '||SSN= ' ' THEN SSN=xxxx
ADDRESS TSO "SUBCOM DSNREXX"
IF RC <> 0 THEN
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX
"CONNECT "SSN
IF SQLCODE ¬= 0 THEN SAY 'ADDRESS FAILED'
ADDRESS DSNREXX "EXECSQL CONNECT"
DB2V = SUBSTR(SQLERRP,4,2)
DB2R = SUBSTR(SQLERRP,6,2)
SAY 'DB2 VER:' DB2V'.'DB2R
RETURN

Change the xxxx to your default subsystem ID.
I can't remember where I filched this from so I can't give an attribution
:-)

Regards,

Steve T

-----Original Message-----
From: Mick Graley [mailto:[login to unmask email]
Sent: Tuesday, 23 January 2007 10:10
To: [login to unmask email]
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi James,

Yeah I'm just looking for the DB2 version of specific sub-systems. We have
LOTS of SAP systems split between V7 and V8 and we currently get the
version using CAF from an assembler program but it would be handy to be
able to do this from REXX. I can't find this functionality of DSNREXX in
the V7 programming guide. Do you have an example?

Cheers,

Mick.


On Fri, 19 Jan 2007 12:34:21 +1100, James Campbell
<[login to unmask email]> wrote:

>Well I presume it's loaded somewhere under the user's TCB - so it's simply
>a matter of following the CDE chain looking for an associated LLE for
>DSNARIB.
>
>However, what's in it that you want? If it's just the DB2 VRM, an SQL
>CONNECT (without parameters) will give you that.
>
>James Campbell
>
>On 18 Jan 2007 at 13:40, Mick Graley wrote:
>
>> Hi All,
>>
>> Does anybody know if it is possible to address the DB2 RIB from a REXX
program
>> connected via DSNREXX?
>>
>> Cheers,
>>
>> Mick.
>>
>>
>> ___________________________________________________________
>>
>> Tiscali Broadband only 9.99 a month for your first 3 months!
>> http://www.tiscali.co.uk/products/broadband/
>>
>> ------------------------------------------------------------------------
---------
>> Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm
>
>--------------------------------------------------------------------------
-------
>Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

************************************************************************
IMPORTANT:

* This transmission is intended for the use of the addressee only and might
contain sensitive or legally privileged information. If you are NOT the
intended recipient, you are notified that any use or dissemination of this
communication is strictly prohibited. If you receive this transmission in
error, please notify the author immediately by telephone and delete all
copies of this transmission together with any attachments.

* The Australian Customs Service DOES NOT AUTHORISE the recipient to further

disclose this email or its contents without permission of the originator.

* Unsolicited commercial emails MUST NOT be forwarded to the originator of
this transmission unless prior consent has been given.


***********************************************************************

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.

The IDUG List Admins can be reached at [login to unmask email] Find

out the latest on IDUG conferences at http://conferences.idug.org/index.cfm


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.10/651 - Release Date: 24/01/2007
18:48

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Mick Graley

Re: Addressing the DB2 RIB from REXX
(in response to Steve Tennant)
Hi Steve,

I think you misunderstood what I was saying - addressing DSNREXX and
connecting to the DB2 sub-system are documented (I've been using DSNREXX
since it was first available as an optional product) but I don't think the
sequence of CONNECT then EXECSQL CONNECT to get the RIB info is documented.
I couldn't find it anyway. However the example you gave me is absolutely
spot on and I will use this technique in the future.

Cheers again,

Mick.


----- Original Message -----
From: <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Thursday, January 25, 2007 4:21 AM
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Mick,
the CONNECT you see follows the ADDRESS to DSNREXX, if you looking the
Application Programming & SQL Guide in section 2.4.6.3 you will see the
documentation. In fact the parent section 2.4.6 has all the bits you need
and some good examples.

Have fun.

Steve T



-----Original Message-----
From: Mick Graley [mailto:[login to unmask email]
Sent: Thursday, 25 January 2007 10:23
To: [login to unmask email]
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi Steve (and James),

Thanks! That's exactly what I was looking for and it works great on V7 and
V8.
Interestingly enough I couldn't find this functionality of the sequence:
"CONNECT" SSN; "EXECSQL CONNECT"
documented in the programming guide or the example program.
If IBM are listening please document this!

Thanks again chaps.

Mick.


----- Original Message -----
From: <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Wednesday, January 24, 2007 2:59 AM
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi Mick,
try this....
/* REXX RETRIEVE DB2 VER.REL */

PARSE UPPER ARG SSN
IF ' '||SSN= ' ' THEN SSN=xxxx
ADDRESS TSO "SUBCOM DSNREXX"
IF RC <> 0 THEN
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX
"CONNECT "SSN
IF SQLCODE ¬= 0 THEN SAY 'ADDRESS FAILED'
ADDRESS DSNREXX "EXECSQL CONNECT"
DB2V = SUBSTR(SQLERRP,4,2)
DB2R = SUBSTR(SQLERRP,6,2)
SAY 'DB2 VER:' DB2V'.'DB2R
RETURN

Change the xxxx to your default subsystem ID.
I can't remember where I filched this from so I can't give an attribution
:-)

Regards,

Steve T

-----Original Message-----
From: Mick Graley [mailto:[login to unmask email]
Sent: Tuesday, 23 January 2007 10:10
To: [login to unmask email]
Subject: Re: [DB2-L] Addressing the DB2 RIB from REXX


Hi James,

Yeah I'm just looking for the DB2 version of specific sub-systems. We have
LOTS of SAP systems split between V7 and V8 and we currently get the
version using CAF from an assembler program but it would be handy to be
able to do this from REXX. I can't find this functionality of DSNREXX in
the V7 programming guide. Do you have an example?

Cheers,

Mick.


On Fri, 19 Jan 2007 12:34:21 +1100, James Campbell
<[login to unmask email]> wrote:

>Well I presume it's loaded somewhere under the user's TCB - so it's simply
>a matter of following the CDE chain looking for an associated LLE for
>DSNARIB.
>
>However, what's in it that you want? If it's just the DB2 VRM, an SQL
>CONNECT (without parameters) will give you that.
>
>James Campbell
>
>On 18 Jan 2007 at 13:40, Mick Graley wrote:
>
>> Hi All,
>>
>> Does anybody know if it is possible to address the DB2 RIB from a REXX
program
>> connected via DSNREXX?
>>
>> Cheers,
>>
>> Mick.
>>
>>
>> ___________________________________________________________
>>
>> Tiscali Broadband only 9.99 a month for your first 3 months!
>> http://www.tiscali.co.uk/products/broadband/
>>
>> ------------------------------------------------------------------------
---------
>> Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm
>
>--------------------------------------------------------------------------
-------
>Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at DB2-L-
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

************************************************************************
IMPORTANT:

* This transmission is intended for the use of the addressee only and might
contain sensitive or legally privileged information. If you are NOT the
intended recipient, you are notified that any use or dissemination of this
communication is strictly prohibited. If you receive this transmission in
error, please notify the author immediately by telephone and delete all
copies of this transmission together with any attachments.

* The Australian Customs Service DOES NOT AUTHORISE the recipient to further

disclose this email or its contents without permission of the originator.

* Unsolicited commercial emails MUST NOT be forwarded to the originator of
this transmission unless prior consent has been given.


***********************************************************************

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.

The IDUG List Admins can be reached at [login to unmask email] Find

out the latest on IDUG conferences at http://conferences.idug.org/index.cfm


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.10/651 - Release Date: 24/01/2007
18:48

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.11/652 - Release Date: 25/01/2007
15:32

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm