Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrapping an RPG program call in a DB2 stored procedure

Status
Not open for further replies.

dsmithtk

Programmer
Aug 21, 2007
1
US
Greetings,

Per the suggestion of an IBM rep, I'm attempting to wrap a call to an existing RPG program in a DB2 stored procedure. I've found some documentation on the topic, but direct documentation and examples have been few and far between.

To clarify - The goal is a DB2 stored procedure that calls an RPG program (with parameters) and returns the results back to the original invoker. The DB2 database and RPG programs reside on an iSeries box running i5/OS V5R4.

Using the IBM "Stored Procedures, Triggers, and
User-Defined Functions on DB2
Universal Database for iSeries" RedBook, I managed to have some limited success with the iSeries Navigator utility - specifically with defining an external procedure pointing to the RPG program in question. However, I hit a roadblock when it came time to define output parameters - I was unable to match the output parameters properly (namely, a custom array field), and received the appropriate accompanying error message.

Any insight or help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top