Midrange News for the IBM i Community


Posted by: dougcmh
Developer
Columbus, OH
Host variables in Run SQL Scripts
has no ratings.
Published: 23 Nov 2011
Revised: 23 Jan 2013 - 1520 days ago
Last viewed on: 22 Mar 2017 (3206 views) 

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.

Host variables in Run SQL Scripts Published by: dougcmh on 23 Nov 2011 view comments(2)

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?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: Host variables in Run SQL Scripts
Posted: 5 years 4 months 19 hours ago

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.

Posted by: dougcmh
Premium member *
Columbus, OH
Comment on: Host variables in Run SQL Scripts
Posted: 5 years 3 months 26 days 14 minutes ago
Edited: Mon, 28 Nov, 2011 at 09:05:33 (1942 days ago)

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.