Hi
We have coded our web service programs for years using this template that I don't know where we got from. It has these lines right at the top
EXEC CICS
ASSIGN CHANNEL(CURRENT-CHANNEL)
END-EXEC
EXEC CICS STARTBROWSE CONTAINER
CHANNEL(CURRENT-CHANNEL)
BROWSETOKEN(MYBROWSETOKEN)
RESP (WS-RESP-CODE)
END-EXEC
EXEC CICS GETNEXT
CONTAINER(WS-CONTAINER)
BROWSETOKEN(MYBROWSETOKEN)
RESP (WS-RESP-CODE)
END-EXEC
EXEC CICS ENDBROWSE CONTAINER
BROWSETOKEN(MYBROWSETOKEN)
RESP (WS-RESP-CODE)
END-EXEC
EXEC CICS GET
CONTAINER(WS-CONTAINER)
CHANNEL(CURRENT-CHANNEL)
NODATA
FLENGTH(WS-LENGTH-OF-CONTAINER)
RESP (WS-RESP-CODE)
END-EXEC
EXEC CICS GET
CONTAINER(WS-CONTAINER)
CHANNEL(CURRENT-CHANNEL)
INTO(WS-CONTAINER-DATA)
FLENGTH(WS-LENGTH-OF-CONTAINER)
RESP (WS-RESP-CODE)
END-EXEC
After we upgraded to CICS v6.1 we discovered that the first container retrieved from the channel is not necessarily the one that contains the payload from the client.
I was just wondering if there was any reason to have taken such an approach rather than just this
MOVE 'my-container-name' to ws-container
EXEC CICS GET
CONTAINER(WS-CONTAINER)
CHANNEL(CURRENT-CHANNEL)
NODATA
FLENGTH(WS-LENGTH-OF-CONTAINER)
RESP (WS-RESP-CODE)
END-EXEC
EXEC CICS GET
CONTAINER(WS-CONTAINER)
CHANNEL(CURRENT-CHANNEL)
INTO(WS-CONTAINER-DATA)
FLENGTH(WS-LENGTH-OF-CONTAINER)
RESP (WS-RESP-CODE)
END-EXEC
We provide the name of the container when we use IDZ to create the various artefacts like .wsbind .wsdl and the driver programs, so we do know it when we are writing this program.
Thanks
------------------------------
[Anand] [Mahadevan]
[Contributor]
[Laboratory Corporation of America]
[Burlington] [NC]
[336.436.8798]
[USA]
------------------------------