Object Rexx access to DB2 universal database 
Author Message
 Object Rexx access to DB2 universal database

Is it possible for me to reach DB2 from my Object Rexx ?

And if yes, how ?



Sun, 27 Aug 2000 03:00:00 GMT  
 Object Rexx access to DB2 universal database



Quote:
>Is it possible for me to reach DB2 from my Object Rexx ?

>And if yes, how ?

yes, you must first register the functions sqldbs and sqlexec. Both of
these are documented api's in db2. I also heard (but have not had a
chance to check) that Universal includes a new 3rd api.

The db2 docs have rexx examples, that you can try.

To register the api's try:
if Rxfuncquery('SQLDBS') <>0 then
    rcy = Rxfuncadd('SQLDBS','DB2AR','SQLDBS');

If rcy \= 0 then
     do
       say 'SQLDBS was not successfully added to the REXX
environment';
       signal rxx_exit;
     end;

/* ----------------- Register SQLEXEC with REXX
--------------------*/
If Rxfuncquery('SQLEXEC') <> 0 then
     rcy = Rxfuncadd('SQLEXEC','DB2AR','SQLEXEC')
If rcy \= 0 then
     do
       say 'SQLEXEC was not successfully added to the REXX
environment'
       signal rxx_exit
     end

then you can do things like
call sqlexec 'connect to sample';
Feel free to email me if you need further help

Regards,
Dave Arnold



Mon, 28 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Accessing DB2 database on OS/390 host

2. Accessing DB2 database on IBM AS/400

3. DB2 access through REXX and OS/2

4. Problem of connection DB2 with Object REXX

5. Object Rexx and DB2

6. Object Rexx and DB2 Server for NT

7. Object REXX for AIX and DB2

8. DB2 and Object REXX on NT Alpha?

9. REXX/DB2 = COBOL/DB2 ???

10. Database access in REXX

11. OS/2 database access via Rexx

12. FW: OS/2 database access via Rexx

 

 
Powered by phpBB® Forum Software