Re: What is wrong?



The SQL source could be placed in an SQLRPG and performed, or more typically entered in an interactive script processor like STRSQL or the iNav Run SQL utility, or in a batch capable script processor like RUNSQLSTM which does accept as input a source member.

I was thinking more about using SQL so I did not consider the RPG aspect as much; probably why Jonathon pointed me back to ILE RPG, since although the procedure might be SQL, the main may not. I am not sure about invoking the function except by SQL. Thus instead of EVAL, if in an SQL program, using EXEC SQL for SET or VALUES INTO syntax:
EXEC SQL SET :input :ind = RtvCtl(WOnbr)
EXEC SQL VALUES (RtvCtl(WOnbr) INTO :input :ind;

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstsetinto.htm
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstvalinto.htm
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstch2refvar.htm

P.S. I avoid '#' references. Variant characters should be avoided whenever possible. Especially for SQL:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstch2iden.htm

Regards, Chuck
--
All comments provided "as is" with no warranties of any kind whatsoever and may not represent positions, strategies, nor views of my employer

qgenesist@xxxxxxxxxxx wrote:
<<SNIP>>

<<SNIP>>

so I type all your code into a source member and create it how?

then you are saying in some sundry RPG pgm I can do
eval input = rtvctl#(wo#)
as if it were a procedure of any sort?

I don't care how I get there, but I do want to have more expressive
ability available to me.

Unfortunately, after many years in the RPG world, I had to do COBOL,
and the way the interfaces were done and written were clunky and quite
a bit different than this, so now I am catching up.
.



Relevant Pages