Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can existing RPG or COBOL programs be used as stored procedures?

0
Posted

Can existing RPG or COBOL programs be used as stored procedures?

0

Yes. DB2 UDB for iSeries supports external stored procedures, which allows existing high-level programs to be called as stored procedures. The CREATE PROCEDURE statement is used to register these programs as stored procedures. Back to questions • I do a CREATE PROCEDURE that contains SQL statements that reference user-defined functions. Before calling the procedure, I do a SET PATH so the functions are found. Why aren’t the functions found when I call the procedure? The SET PATH statement must be done before the CREATE PROCEDURE statement. The path for static statements in a precompiled program is determined when the program is created. In the case of CREATE PROCEDURE, we create an SQL C program. Dynamic statements in the procedure use the current path, but the static statements in the procedure use the path that was used at the time of creation. This is also true for the CREATE FUNCTION statement.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123