ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IBM iSeries Access driver if compatible with Message Broker

Post new topic  Reply to topic
 IBM iSeries Access driver if compatible with Message Broker « View previous topic :: View next topic » 
Author Message
sreemoyee.b
PostPosted: Thu Jul 30, 2009 1:31 am    Post subject: IBM iSeries Access driver if compatible with Message Broker Reply with quote

Newbie

Joined: 20 Jul 2009
Posts: 6

Hi all,

I have to call a stored procedure from an AS400 system from my message broker toolkit. Could anybody please suggest what drivers I should use..

As I am getting only the system details (Box name, IP Address, Port Number, UserID and password) , not the Database alias name or any database related info, it is not being possible for us to connect to the system with the IBM DB2 ODBC driver (that comes with the Broker database itself).

Do I need an IBM iSeries Access ODBC Driver.. I got this option from net.. Butam not sure if I can connect to AS400 with this driver from Message Broker.

Or else, (by googling) what I found is : if I have IBM DB2 Connect setup, then also I can connect to AS400.. In that case, what driver I should use..

As am very new to this field, am not able to understand d approach I should take.. need some kind of help ASAP..

Thank u in advance..
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Jul 30, 2009 1:42 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

Is the remote database in which the stored procedure resides a DB2 database or of some other make ?
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Maximreality
PostPosted: Thu Jul 30, 2009 3:23 am    Post subject: Re: IBM iSeries Access driver if compatible with Message Bro Reply with quote

Acolyte

Joined: 04 Jun 2004
Posts: 65
Location: Copenhagen

Try installing DB2 control center on your laptop, then you should be able to discover DB2 databases on your network

Then you should find information for setting up your ODBC connection

/Rasmus
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Jul 30, 2009 3:29 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

This is what IBM told me about a similar question:

Quote:
The broker makes connections via ODBC and, in the case of DB2, the ODBC driver always connects to the database, be it local or remote, via the DB2 client.
So, first a DB2 client definition (i.e. an 'alias') for the remote database must be made and then an ODBC definition made which points to the database alias.
There is no charge required for client interconnection amongst distributed platforms (UNIX, Linux, Windows) but IBM charges for, and enforces by license, connections from distributed client to host databases, i.e. DB2 servers on zOS or iSeries. Up to DB2 v8.2 this host connection functionality was provided by the DB2 Connect product. From DB2 9, the clients were re-architected to be capable of host connection but a chargeable license is still required to use it to connect to host databases.

In summary, DB2 Connect function and license is required only if connecting from distributed broker to a host database; distributed broker to distributed DB2 works out of the box for no additional charge."
Back to top
View user's profile Send private message
sreemoyee.b
PostPosted: Thu Jul 30, 2009 6:15 am    Post subject: Reply with quote

Newbie

Joined: 20 Jul 2009
Posts: 6

The stored procedure is in the AS400 box. It is a DB2/400 system. (V5R4). Thatz all info we have about the database.

With DB2 for i5/OS driver I am able to connect to the system. I can see the procedure also.. but how can i call that stored procedure from ESQL code? I dont have any Data Source for that.. Can I use Java Compute node for calling with JDBC driver? In that case, What code should I write inside? Do i need any IBM DB2 connect setup for that?
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Jul 31, 2009 12:44 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Use an ODBC connection from a Compute node.
Back to top
View user's profile Send private message
sreemoyee.b
PostPosted: Fri Jul 31, 2009 2:16 am    Post subject: Reply with quote

Newbie

Joined: 20 Jul 2009
Posts: 6

IBM DB2 ODBC driver is not working (as for creating the DSN we need to have the DATABASE NAME or ALIAS)..

Should I use iSeries Access ODBC driver for connecting? Would it work/?
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Jul 31, 2009 2:46 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Get DB2 connect working - don't look for ways around the basic issue here.

If it is documented as supported - make it work or call IBM for help.
Back to top
View user's profile Send private message
christian82
PostPosted: Tue Aug 04, 2009 7:08 am    Post subject: Reply with quote

Newbie

Joined: 24 Jul 2009
Posts: 7

you could use jt400.jar from toolbox form java compute node like this:

String sql = "{call STALIBRP.STASPICR(?, ?, ?, ?, ?, ?)}";

String svrIP_as400 = "localhost";
String usuario_as400 = "user";
String clave_as400= "password";
String lib_as400="STALIBRP";

//enabling connection
AS400JDBCDataSource ids = new AS400JDBCDataSource(svrIP_as400);
ids.setUser(usuario_as400);
ids.setPassword(clave_as400);
ids.setLibraries(lib_as400);

CallableStatement stmt = ids.getConnection().prepareCall(sql);

//setting procedure params

stmt.setString(1, icrInput.getIdServicio());
stmt.setString(2, icrInput.getIdConsumidor());
stmt.setString(3, icrInput.getIdProveedor());
stmt.setString(6, icrInput.getCargaUtil());

stmt.registerOutParameter(4, Types.CHAR,icrOutput.getCodRespuesta());
stmt.registerOutParameter(5, Types.CHAR, icrOutput.getDesRespuesta());
stmt.registerOutParameter(6, Types.CHAR, icrInput.getCargaUtil());

stmt.setQueryTimeout((newInteger(1000)).intValue());
stmt.execute();
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IBM iSeries Access driver if compatible with Message Broker
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.