Hello boarders,
So,I have started writing procedures and this is completely new to me.so please don't kill me if i may ask a dummy questions.
I wrote a sql procedure and got it compiled after multiple retries.Now i am trying to test it/debug it.
it has 3 inp and 1 out parameter
this is what it looks like
i am trying to fetch all the records
1.first thing how do i debug the stored proc i have put the debug option to *source but unable to understand how do i call it to debug.
tried runsql also
I am trying to call the stored proc using call syntax in isereis navigator, it calls the stored proc but gives an error saying feild not found in file.
2. Is there a particular way should i use the variable(how do i refer/use feilds in the file)
3. for the out parameter i am trying to pass a initial value i have tried the runsql command(as an alternative to run sql script) it fails saying that out parameter value not allowed for in,inout,out,if i don't put anything it says stored proc not found.
4.also do we something like datastructures in stored proc where i would fetch the data into the ds then i could use the variable.(that is how i do it in rpgle).
5.Can i use select * in stored proc cause i have seen many example using into clause. i wanted to have all the feilds accesible without using the into clause
Also i would like to ask any questions on this topic here as i don't want any new threads to open . hope admin have no issues with this.
So,I have started writing procedures and this is completely new to me.so please don't kill me if i may ask a dummy questions.
I wrote a sql procedure and got it compiled after multiple retries.Now i am trying to test it/debug it.
it has 3 inp and 1 out parameter
this is what it looks like
PHP Code:
declare c1 ccursor for
[B]select * from table where abc=def[/B];
open cursor
fetch from c1;
if fld1 ='XYZ' --- [B]THIS IS WHERE i am getting the error[/B]
1.first thing how do i debug the stored proc i have put the debug option to *source but unable to understand how do i call it to debug.
tried runsql also
I am trying to call the stored proc using call syntax in isereis navigator, it calls the stored proc but gives an error saying feild not found in file.
2. Is there a particular way should i use the variable(how do i refer/use feilds in the file)
3. for the out parameter i am trying to pass a initial value i have tried the runsql command(as an alternative to run sql script) it fails saying that out parameter value not allowed for in,inout,out,if i don't put anything it says stored proc not found.
4.also do we something like datastructures in stored proc where i would fetch the data into the ds then i could use the variable.(that is how i do it in rpgle).
5.Can i use select * in stored proc cause i have seen many example using into clause. i wanted to have all the feilds accesible without using the into clause
Also i would like to ask any questions on this topic here as i don't want any new threads to open . hope admin have no issues with this.




Comment