Whether DB2 support one of the Input parameter as Cursor in Stored procedures. How to handle the Multiple rows as input to stored procedures, these rows count is different in each execution.
My Requirement: On Client system opened one cursor and retrieve some rows from based on some conditions. This information should pass to mainframe.
For example DEFECT table has below two columns
Client system should pass above information to Mainframe.
Please confirm Below method is correct?
In My DDL I have declared maximum limit is 20 and handling the situation , is this correct way?
IN IN_DEFCT_LINE_NUM_I CHAR (60), // 3 * 20 = 60
IN IN_DEFCT_X CHAR (1600), // 80 * 20 = 1600
OUT OUT_ERROR_MSG CHAR (254),
OUT OUT_ERROR_CODE CHAR (10)
RESULT SETS 0
Client system cannot pass more than 20 Rows at a time
Client system should concatenate all the DEFCT_LINE_NUM_I into one string and pass as input parameter and same for DEFCT_X also.
He has to pass the fixed length ( while concatenating he has to use the fixed length )
Your approach is correct. I have a similar scenario in my project and this is how we do. The inputs should be concatenated into on string and the receiving mainframe store proc should unstring the inputs and process individually.
Let me know if you are struck some where.