How to use embedded SQL in a RPG program used as a stored procedure

20 pts.
Tags:
Embedded SQL
iSeries RPG programming
Stored Procedures
When I use embedded SQL in a RPG program and call it from another program it works fine. But, when I try to use the program as a stored procedure it gives me a SQL error. I have worked with stored procedures and understand them, but have not been successful using embedded SQL with them. Any ideas anyone?
ASKED: February 9, 2009  9:36 PM
UPDATED: February 12, 2009  9:12 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

It’s more than likely something to do with the library list. I usually use qcmdexc to add the libraries I need to the list or do ovrdbf command, in the inzsr routine.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Cwc
    What is the error - could you post the relevant entries from the job log and an excerpt of your code, as well as the parameters you used to create as a stored procedure? Then we can take a gander at it.. :)
    4,290 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following