A fix is available
APAR status
Closed as program error.
Error description
The "Anonymous ResultSets" property shown in the JSON ResponseSchema reported by Db2 Service Discover v.s. the actual Db2 Service Invocation JSON response are not correct. The JSON ResponseSchema reported by Db2 Service Discover needs to be corrected to better reflect the actual JSON Response content for Stored Procedure returned Resultsets. We need to report the "ResultSet <x> Output" similar to this instead of using "Anonymous ResultSets": "properties": { ... "ResultSet 1 Output": { "description": "Stored Procedure ResultSet 1 Data" , "type": "array", "items": { "description":"Stored Procedure ResultSet Row" , }, "ResultSet 2 Output": { "description": "Stored Procedure ResultSet 2 Data", "type": "array", "items": { "description":"Stored Procedure ResultSet Row", "type":"object" } ... Additional Keywords: Db2REST DDFREST
Local fix
Manually edit the response.
Problem summary
**************************************************************** * USERS AFFECTED: All users of DB2 for z/OS native RESTful * * services support. * **************************************************************** * PROBLEM DESCRIPTION: The JSON Response Schema, as reported * * by the Db2 native REST services * * "Discover Service Details" API, for a * * Db2 REST service that includes stored * * procedure dynamic returned result * * sets, incorrectly shows the "Anonymous * * ResultSets" property key as being a * * "Required" property in the JSON * * Response Schema. The "Anonymous * * ResultSets" property is not included * * in the REST service invocation * * response, so it should not have the * * "Required" attribute in the JSON * * Response Schema. * **************************************************************** * RECOMMENDATION: Apply corrective PTF when available. * **************************************************************** The "Anonymous ResultSets" property key shown in the JSON Response Schema for a Db2 REST service which calls a stored procedure that includes dynamic returned cursors, as reported by the Db2 native REST Service Discover Details API, incorrectly shows the "Anonymous ResultSets" property key as being a "Required" key in the response. The "Anonymous ResultSets" key is not part of the actual response content, so it should not be included in the JSON Schema "Required" attribute list. In addition, the JSON Response Schema reported by the Db2 Service Discover Details API should be updated to include the optional "ResultSet <x> Output" JSON Response keys that are used to return the Stored Procedure dynamic returned result sets.
Problem conclusion
The JSON Response Schema returned by the Db2 native REST discover service details API has been updated to more accurately report the JSON response body content that is returned when invoking a Db2 native REST service that calls a Db2 stored procedure which returns dynamic result sets. The changes include removing the "Anonymous ResultSets" property key from the "Required" attributes list, and also the addition of "ResultSet <x> Output" property key(s) that are used to return Db2 stored procedure returned dynamic result set data. Please note: By definition, all Db2 stored procedure returned result set content is DYNAMICALLY DETERMINED at the completion of the stored procedure EXECUTION. Therefore, Db2 stored procedure returned result set content can NOT be determined or predicted by Db2 prior execution of the Db2 stored procedure. While this APAR improves the reported JSON Response Schema content to now include the possible "ResultSet <x> Output" JSON property keys that are used to return the dynamic returned result set data, this APAR does NOT change the fact that the actual result set JSON column names and data types can not be determined by the native REST services Discover Service Details API. Since the actual returned result set content can not be determined by the REST discover service details API, the JSON Response Schema will show the "ResultSet <x> Output" key as being a JSON Array of generic and unspecified, Object structures. The partial output from the updated Db2 REST services Discover Service Details below shows a partial example JSON Response Schema for a Db2 native REST service that calls a Db2 Stored Procedure that is defined with a returned result set count of two (2): ... "ResponseSchema":{ ... "type":"object", "properties":{ "Anonymous ResultSets":{ "multipleOf":1, "maximum":2, "description":"Number of Anonymous ResultSets", "type":"integer", "minimum":0 }, "ResultSet 1 Output":{ "description":"Stored Procedure ResultSet 1 Data", "type":"array", "items":{ "description":"ResultSet Row", "type":"object" } }, "ResultSet 2 Output":{ "description":"Stored Procedure ResultSet 2 Data", "type":"array", "items":{ "description":"ResultSet Row", "type":"object" } }, "StatusDescription":{ "description":"Service invocation status description", "type":"string" }, "StatusCode":{ "multipleOf":1, "maximum":600, "description":"Service invocation HTTP status code", "type":"integer", "minimum":100 } }, "required": "StatusDescription", "StatusCode" } ...
Temporary fix
Comments
APAR Information
APAR number
PH07557
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2019-01-21
Closed date
2019-04-24
Last modified date
2020-03-06
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI62694 UI62698
Modules/Macros
DSNLJEMG DSNLJGUS
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
06 March 2020