Link to home
Start Free TrialLog in
Avatar of agorsky73
agorsky73

asked on

How Do I Call An RPG Program From An iSeries Stored Procedure?

I need to be able to call an RPG program from an iSeries Stored Procedure.  The program that we have is that when the procedure is called an error is returned that the program cannot be found in the library.  We are calling the procedure from a .NET application.  We are able to run other procedures that query the files directly by setting the DefaultCollection.  However, this doesn't seem to resolve a call to an RPG program.  Any ideas?  I have included the procedure we created that calls the RPG program.
CREATE PROCEDURE BP_P55GMAPOST(
	IN BatchNo 	CHAR(50),
	OUT Error 	CHAR(50)
) 
LANGUAGE RPGLE
MODIFIES SQL DATA
CALLED ON NULL INPUT 
EXTERNAL NAME P55GMAPOST
PARAMETER STYLE GENERAL WITH NULLS

Open in new window

Avatar of Theo Kouwenhoven
Theo Kouwenhoven
Flag of Netherlands image

Hi Agorsky,

I did it some time ago, dont ask me how it works and why, (I don't know nothing of ASP or .NET)
but I dont care it worked so mission completed.

I had a big help at this link:
http://www.netsplore.com/PublicPortal/Default.aspx?tabid=246

Good Luck,
Murph
Avatar of agorsky73
agorsky73

ASKER

I read that article but that solution won't work for me. That solution requires the use of ActiveX and I need to stick with the ADO.NET provider.  Ultimately the issue isn't .NET because we receive an error if we run the stored procedure on the iSeries from iSeries Navigator.
If you receive an error on the call, it could be possible that the one of the involved objects was not found, did you set a librarylist?
ASKER CERTIFIED SOLUTION
Avatar of Member_2_276102
Member_2_276102

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In the tag Server, of the coneccion ODBC that uses the program, is a texbox, called a List of Libraries, there it is necessary to put the libraries where there are the programs that are used, separated by comma or space.
ODBC.GIF