I've determined that the problem stems from defining the plaza input 
parameter on my subprocedure as pass by value. SQL stored procedures do 
not support pass by value. When I changed the parameter definition on my 
subprocedure to pass by reference, the stored procedure call works. Thanks 
again, Craig, for your assistance (and also the informative articles on 
this subject).
Blake
- - - - - - - - - - - - - - 
Thanks for your help, Craig. I'm am running the latest service pack for 
V6R1 (SI37891) and added "AllowUnsupportedChar=true; " to my connection 
string. That does get me past the 6107 error, but the stored procedure 
call is still not working. It looks like the problem is that the 3-byte 
input plaza parameter is coming across as null (x'000001'). In debug, I 
can see in VS that the input plaza is correctly populated (e.g., "197"). 
On the RPG side, the subprocedure checks the input plaza value by trying 
to convert it with %dec(). If the conversion fails, it returns with a -1 
return code and an error message, which in this case is "Invalid plaza 
value: \0\0", where "\0\0" is the input parameter value. That probably 
accounts for the original 6107 error because initially I was just 
returning the null input parameter value on error without prepending the 
"Invalid plaza value: " string.
Blake
See the last message on this thread:
http://www.ibm.com/developerworks/forums/message.jspa?messageID=13925192
http://www-912.ibm.com/n_dir/nas4apar.nsf/ALLAPARS/SE35276
Fix available in V6.1 provider with Service Pack SI34289 (Feb 2009) or 
later. 
Craig Pelkie
As an Amazon Associate we earn from qualifying purchases.