This operation is meaningful only if a single result set is returned.
You can convert procedure call result in DB2API to a structure similar to select result. This page includes an example of editing procedure result using shift operation.
{
"statusCode": 200,
"statusDescription": "OK",
"numRows": 0,
"data": [ {} ],
"result": [
{
"data": {
"columnNames": [ "xxx", "yyy" ],
"numRows": 2,
"result": [
{ "xxx":"aaa", "yyy":"bbb" },
{ "xxx":"ccc", "yyy":"ddd" }
]
}
}
],
"elapsedTime": 6,
"errors": []
}
[
{
"operation": "shift",
"spec": {
"statusCode":"statusCode",
"statusDescription":"statusDescription",
"result": {
"*": {
"data": {
"columnNames":"columnNames",
"numRows":"numRows",
"result": "data"
}
}
},
"elapsedTime":"elapsedTime",
"errors":"errors"
}
}
]
{
"statusCode" : 200,
"statusDescription" : "OK",
"columnNames" : [ "xxx", "yyy" ],
"numRows" : 2,
"data" : [
{ "xxx" : "aaa", "yyy" : "bbb" },
{ "xxx" : "ccc", "yyy" : "ddd" }
],
"elapsedTime" : 6,
"errors" : [ ]
}