View Full Version : SQL Procedure
01-01-1995, 02:00 AM
I want to know why a SQL procedure need the compiler C ILE when I'm trying to generate the code with the command RUNSQLSTM, if my procedure contains only SQL statements, because I don't need any other language more than SQL. I run this command RUNSQLSTM but it generates some errors Does anybody can help me ? I'll attach my procedure and the error compilation generated Thanks.
08-22-2000, 04:42 PM
Jose, I -believe- that you do not need C/ILE, but you do need SQL/400 in order to create procedures. Bill
08-22-2000, 04:50 PM
Jose, In order to compile a procedure with LANGUAGE SQL you need the C compiler. I beleive that under the covers the system generates C source that is then compiled compiled. You can also create procedures in other languages and link them to an external ILE procedure or program. David Morris
08-24-2000, 05:38 AM
Yes, it is required. From http://publib.boulder.ibm.com/pubs/html/as400/v4r4/ic2924/info/db2/rbafzmst131.h tm#HDRROUTES <<When an SQL routine is created, SQL creates a temporary source file (QTEMP/QSQLSRC) that will contain C source code with embedded SQL statements. An SQL procedure is created as a program (*PGM) object using the CRTSQLCI and CRTPGM commands. An SQL function is created as a service program (*SRVPGM) object using the CRTSQLCI and CRTSRVPGM commands. >>
08-24-2000, 08:01 AM
Yes, ILE C compiler is required for creating SQL Procedures. But, procedures can also be written in other languagues like RPG and C. The definition for these are created using the CREATE PROCEDURE statement HTH arun
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.