Call a Stored Procedure in AS400: how to?

One Star

Call a Stored Procedure in AS400: how to?

Hello,
is there any component for calling a AS400 stored procedure which returns a recordset in Talend?
I have found components calling Stored Procedures for almost any db but AS400.
I have tried using tAS400Row and tAS400input but with no luck...if anyone managed to do it with those components, can she/he help me with the configuration?.
It would be ok also a "community" component and not an "official" one.
Using tJava I can connect to AS400 stored procedure and retrieve a recordset correctly, but I would like to keep writing my own java code (see attachment) as the last resort, in order do manage connections via Talend components, for mainteinance reasons etc. etc.
Thanks in advance
---------------------------------
CODE SNAPSHOT
AS400JDBCDriver d = new AS400JDBCDriver();
AS400 o = new AS400("as400machine", "as400user", "as400pwd");
Connection c = d.connect (o);
CallableStatement cs = c.prepareCall( "call CNPSTRDP.tabelle ('TTG', ' ',' ',' ',' ') " );
ResultSet rs = cs.executeQuery();
int count = 0;
while(rs.next())
{
System.out.println("\n row num "+count);
System.out.println(rs.getString(1));
count++;
}
cs.close();
etc.
Moderator

Re: Call a Stored Procedure in AS400: how to?

Hi,
There is a jira issue asking for component tAS400SP which can call a stored procedure.
See the bug https://jira.talendforge.org/browse/TDI-14600. Could you please add your comments into it?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Call a Stored Procedure in AS400: how to?

Sabrina, thanks for your reply.
I have done as you told me... I hope it is something they can fix quickly because it would be very useful (almost fundamental) for a development I am doing.
Even a beta version, for start, could be very important.
Alessandro
Moderator

Re: Call a Stored Procedure in AS400: how to?

Hi Alessandro,
Thanks for your contribution. We will try our best to do that. I will track this issue and inform you as long as there is a solution.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Community Manager

Re: Call a Stored Procedure in AS400: how to?

Hi Alessandro,
In JIRA, there is also a "vote" feature. Feel free to vote for this feature to be done in a future release.
Cheers
Elisa