Discovering which containers were returned from a link
Following a LINK command, a program can discover the names of the containers returned by the program that was linked to.
A program creates a channel, which it passes to a second program by means of an EXEC CICS LINK PROGRAM( program-name ) CHANNEL( channel-name ) command. The second program performs some processing on the data that was passed to it, and returns the results in the same channel (its current channel). On return, the first program knows the name of the channel which has been returned, but not necessarily the number and names of the containers in the channel. (Does the returned channel contain the same containers as the passed channel, or has the second program deleted some or created others?)
- EXEC CICS STARTBROWSE CONTAINER BROWSETOKEN( data-area ) CHANNEL( channel-name ).
- EXEC CICS GETNEXT CONTAINER( data-area ) BROWSETOKEN( token ).
- EXEC CICS ENDBROWSE CONTAINER BROWSETOKEN( token ).