I am successfully using (external) stored procedures with many RPGLE programs.
(Some of these are SQLRPGLE programs because they return a result set.)
All of this works fine.
But if I try to replace some of the RPG I/O in a RPGLE program with embedded SQL,
creating a SQLRPGLE program, and run it as a stored procedure,
I get a SQL error. I can call the same program from another program and it runs fiine.
It is as if this double use of SQL is a no-no.
Is there a way to use embedded SQL in a SQLRPGLE program
and be able to run it as a stored procedure?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!