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 » Calling AS/400 Stored Procedure through DB2Connect from AIX

Post new topic  Reply to topic
 Calling AS/400 Stored Procedure through DB2Connect from AIX « View previous topic :: View next topic » 
Author Message
AviD
PostPosted: Fri Mar 16, 2007 12:31 pm    Post subject: Calling AS/400 Stored Procedure through DB2Connect from AIX Reply with quote

Acolyte

Joined: 06 Apr 2004
Posts: 62

Hey all, not sure if anyone here can answer this, but if you have any recommendations on where to ask, please let me know.

This issue has been giving me trouble as I'm trying to troubleshoot a WMB 6.0.2 message flow lock-up when calling an AS/400 DB2 stored procedure called through WMB on AIX with DB2Connect.

To simplify the situation, I am attempting to cut out WMB and call the stored procedure directly from the DB2 Command Line on the AIX server but running into problems.

I successfully log into the remote database with the appropriate ID via DB2Connect.

Then I run the following...
$ db2 "call LIB123.PROG456('SomeValue')"

And get the following very generic and non-helpful error...
SQL1042C An unexpected system error occurred.


Now the stored procedure signature is a single INOUT argument in a fixed format, so essentially the first part of the argument's value is parsed by the stored procedure and the result is stored in the latter part of the INOUT argument when it is returned.

I don't know much beyond that, as I did not write the stored procedure, it is essentially a "black box" to me. From what I understand, it has some COBOL element to it.

So, ultimately, my questions are....

1) What is the correct way to call this kind of stored procedure with a single INOUT parameter

2) How do I display the results to this stored procedure?

I do know the format of the fixed format they are using, so I know the indexing to parse on.

If anyone has any ideas, please let me know. Been battling through it for a few days.


Worth noting, I've put the message flow on debug, but have to stop the message flow after the lock-up (which takes a few minutes to actually stop) and the following exception is returned:

Database error: SQL State ''38501''; Native Error Code '-443'; Error Text ''[IBM][CLI Driver][AS] SQL0443N Routine "LIB123.PROG456" (specific name "*N") has returned an error SQLSTATE with diagnostic text "*LIBL.PROG456". SQLSTATE=38501 ''

I'm researching that error now as well, but thought I'd ask about the DB2 Command Line issues as that is something that has gone unresolved and would be greatly beneficial in troubleshooting this issue without having WMB involved.


Let me know if I can provide any more detail.

Thanks all.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Mar 16, 2007 1:43 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

could it be something like this? http://archive.midrange.com/midrange-l/200504/msg00417.html
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
AviD
PostPosted: Mon Mar 19, 2007 6:45 am    Post subject: Reply with quote

Acolyte

Joined: 06 Apr 2004
Posts: 62

Michael:

Thanks for the reply. Unfortunately that is all greek to me.

Back to researching the issue today. Just weird that full cycle will work if I pass the exact length (non space filled) values) but fails if spaces are appended to some of the fields...other fields are fine space filled.

I was hoping to just call the stored procedure from the command line to eliminate WMB as being a point of failure...but finding out how to do that without a return parm (ala prepared statement like) has me stumped...never done it that way before from the DB2 command line. I'm sure it's not difficult, just can't seem to find an example on how to do it. Hopefully others will chime in.


EDIT:

Hrm, just heard from the AS/400 programmer...apparently there is a library cataloging issue on their side...wrong program is being called (older version) where the spaces were an issue.
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 » Calling AS/400 Stored Procedure through DB2Connect from AIX
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.