vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Greetings you DB2 gurus! I have used stored procs in Orable, Sybase and SQL Server for years. I am now trying to understand the process in DB2 (running on OS/400 V5R1). I have a simple stored procedure that I have created via the AS/400 Operations Navigator: CREATE PROCEDURE NORM.npn_test ( IN pContactId character(6), OUT oName character(30)) LANGUAGE SQL SPECIFIC NORM.npn_test DYNAMIC RESULTS 1 BEGIN DECLARE sName CHAR(30); SET sName = (SELECT ADADTX || ', ' || ADAETX FROM MAILIB.UUADCPP WHERE ADAANB = pContactId); SET oName = sName; END So far so good! Now when I run: select * from qsys2.sysparms where specific_schema = 'NORM'; I get these results: SCHEMA SPECIFIC_NAME ORDINAL_POSITION PARAMETER_MODE PARAMETER_NAME NORM NPN_TEST 1 IN PCONTACTID NORM NPN_TEST 2 OUT ONAME But when I run: call npn_test('000006', ?); I get the error: "The number of parameter values set or registered does not match the number of parameters."? What am I missing? cheers, Norm |