Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
I have a dumb question, but this has been plaguing me all morning.
I wrote a stored procedure (6.1, btw).
It has no result sets, but it does have some INOUT and OUT parms.
It is external - it calls an RPGLE program.
I wish to test the stored procedure now.
I am trying to test it in Run SQL Scripts.
My question - How, on God's glorious green globe, do I declare and use host variables in Run SQL Scripts?
Umm .. you don't? I'm thinking your problem is that you need to pass the parms for the stored procedure itself. Lacking anything already in place, you need to create another stored procedure (read: test program) that doesn't really do anything but declare suitable variables for the parms and then CALLs your stored procedure.
Actually, I ended up testing it from an RPG program (embedded SQL CALL statement) basically, what Dale said.
Why I didn't think of that earlier, I don't know.
Mind in holiday mode, I guess.