Question & Answer
Question
Why am I getting RESP=16 and RESP2=45 when executing an EXEC CICS WEB CONVERSE command? I am doing an EXEC CICS TRANSFORM DATATOJSON to create a JSON structure. When I attempt to do the WEB CONVERSE I am not getting a code page conversion.
The CONVERSE command follows:
EXEC CICS WEB CONVERSE POST
URIMAP (WS-URIMAP-NAME)
CHANNEL (OLB-CHANNEL)
CONTAINER (API-CONTAINER-TRANS)
INTO (WS-LARGE-AREA)
TOLENGTH (WS-LARGE-LENGTH)
MEDIATYPE (WS-MEDIA-TYPE)
CLIENTCONV (WS-CLICONVERT)
CHARACTERSET (WS-CHAR-2)
BODYCHARSET (WS-BODYCHAR)
STATUSCODE (WS-STATUS-CODE)
STATUSTEXT (WS-STATUS-TEXT)
STATUSLEN (WS-STATUS-LENGTH)
RESP (WS-EIBRESP)
RESP2 (WS-EIBRESP2)
SESSTOKEN (WS-SESSION-TOKEN)
END-EXEC.
Our media type is defined as 56 bytes:
03 WS-MEDIA-TYPE.
05 FILLER PIC X(39)
VALUE 'xxxxxxx/xxx.xxxxxxx.xxxxx-v1.0+json'.
Our characterset is defined as 40 bytes:
03 WS-CHAR-2 PIC X(05) VALUE
'UTF-8'.
From our testing application/json as a media type generates the proper UTF-8 code page conversion.
Answer
The Resp=16 means INVREQ (Invalid Request) and the Resp2=45 indicates that the character set specified is invalid. The meaning of both of these response codes can be found in the WEB CONVERSE command section of the CICS TS documentation.
Working with the CICS change team, I found that the problem is that the charset being passed in is only defined as a PIC X(5). This parameter is required to be 40 bytes so what is actually used is the 40 bytes in storage starting with UTF-8. There is lots of unwanted data in the remaining bytes that causes the character set to be rejected. If the characterset is actually supplied as a PIC X(40) then this will all work.
After changing to a 40 character field the CONVERSE command is worked successfully.
Product Synonym
CICS/TS CICSTS CICS TS CICS Transaction Server
Was this topic helpful?
Document Information
Modified date:
19 September 2018
UID
dwa1446622