Question

  Asked: Aug 3 2006   10:58 AM GMT
  Asked by: ashnirody


Stored Procedures on AS/400


AS/400, Application development, DB2 universal database, PC/Windows Connectivity, RPG, RPGLE, Web development, Database, Oracle, DB2, SQL, SQL Server, Development, Web development tools, WebSphere Studio

Greetings,

I understand SQL stored procedures on the AS/400 generate C source code which is compiled to create a C ILE program object. I could use the same SQL statements in an RPGLE with embedded SQL program and use that to create a RPG stored procedure. Which of the two is more efficient?

Thanks for your input.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



It depends on how you measure efficiency.
For example the generated C code is not as fast as well crafted code. However the user response time difference is likely to be trivial.
For developer efficiency, I can build, test and deploy 3 SQL stored procedures in a half hour while an RPG developer takes 2 days. Different skill sets, different tools have a big impact.
The important point for you to consider is that the RPG precompiler generates the same C code for the embedded SQL as the stored procedure does. How can you make that more efficient by wrapping it in a bunch of RPG code?
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400, Development and Database.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register