Richard,
According to the ILE RPG Reference Manual, the *INZSR subroutine "...is called at the end of the program initialization step of the program cycle (that is, after data structures and subfields are initialized, external indicators and user data fields are retrieved, files are opened, data area data structures, arrays, and tables are loaded, and PARM result fields moved to factor 1 for *ENTRY PLIST)."
Couldn't you just make the files USROPN?
Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Richard Schoen
Sent: Wednesday, March 31, 2010 9:55 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Calling Stored Procedure that Calls CL that Calls RPG and Returning Recordsets
Hello All,
I'm pretty sure this won't work, but I will ask.
I have created an RPG stored procedure program that when called directly
from the stored procedure returns recordsets just fine. Good !
Would like to perform some setup stuff such as OVRDBF, etc to make sure
lib list and other stuff is good to go.
Tried putting a CL in front of the RPG call to do the overrides, but NO
recordset gets returned. Most likely because of the CL call between the
SPROC and the RPG.
So the questions:
1.) Can a CL program be called from a stored procedure that calls an RPG
and ultimately returns a recordset ? (I'm guessing not.)
2.) Is using *INZSR a better alternative that will work so I can just
call the RPG and do all the setup stuff there. Some of the discussions
I've seen say that *INZSR happens before file opens, etc....
Thanks in advance for any insight.
Regards,
Richard Schoen
RJS Software Systems Inc.
Where Information Meets Innovation
Document Management, Workflow, Report Delivery, Forms and Business
Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site:
http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT
As an Amazon Associate we earn from qualifying purchases.