Sivu
105 pts. | Feb 6 2009 8:59AM GMT
Still unable to find the code which i have written
I think, the procedure is getting generated as a program while running the same in STRSQL.
The job log says, a module is getting created and a program is created, finally the module is deleted by the system itself.
We are unable to find the source details for the procedure since it is created as program (same as EXE format: You can not view the coding)
i created the below proc
CREATE PROCEDURE BOTEST/tempproc
LANGUAGE SQL
P1: BEGIN
DECLARE PROC_DATE CHAR(10);
SET PROC_DATE = SUBSTR(PROCDATE,1,4)||’-’
||SUBSTR(PROCDATE,5,2)||’-'||SUBSTR(PROCDATE,7,2);
END P1
following are the sys msgs:
File QSQLSRC in library QTEMP already exists.
File QSQLSRC in library QTEMP changed.
Member TESTPROC added to file QSQLSRC in QTEMP.
Member TESTPROC added to file QSQLT00160 in QTEMP.
Module TESTPROC was created in library BOTEST on 06/02/09 at 13:15:57.
Program TESTPROC created in library BOTEST.
Object TESTPROC in BOTEST type *MODULE deleted.
Cwc
3860 pts. | Feb 6 2009 3:19PM GMT
Once created, a stored procedure should remain intact until someone or some program instructs the system otherwise. In your log below, the system is creating some temporary files and modules ‘behind the scenes’, and then it’s cleaning up these temporary objects after the stored procedure has been created. So your stored procedure is still there.
The code to create it is one and the same as your statement. I suspect the statement is stored in a system library, but I’m not sure exactly where or which file. But do you even need that, since you already have the statement which created your procedure?
Also, have you looked through iSeries Navigator? You can view the SQL procedures through that application.
Ashnirody
100 pts. | Feb 8 2009 8:28PM GMT
The log is from the creation of a SQLCBL program TESTPROC in library BOTEST. This is standard - a module is created, a program is created and then the module deleted.
The CREATE PROCEDURE statement is for an stored procedure TEMPPROC (NOT TESTPROC).
You are confused with the similar names. There is no connection between the two.






