Chapter 15 Quiz: CICS Channels and Containers
Question 1
What is the maximum size of a CICS COMMAREA?
A) 16,384 bytes B) 32,760 bytes C) 65,535 bytes D) Limited only by region storage
Answer: B The COMMAREA maximum is 32,760 bytes, constrained by the halfword length field in the CICS control blocks that manage COMMAREA storage. This limit has been constant since CICS/VS and will not change to preserve backward compatibility.
Question 2
Which statement best describes the relationship between a channel and its containers?
A) A channel is a fixed-length data area divided into container sections B) A channel is a named, scoped collection of named data blocks called containers C) A channel is an alias for a TS queue that holds container records D) A channel is a VSAM file used to persist container data between transactions
Answer: B A channel is a logical grouping mechanism — a named collection of containers. The channel itself holds no data; the data resides in the individually named containers within the channel.
Question 3
What happens when you PUT a COMP-3 (packed decimal) field into a CHAR container and that container is transmitted via DPL to a region with a different CCSID?
A) The data is transmitted without conversion because CICS detects packed decimal format B) CICS converts the packed decimal data as if it were character data, producing corrupted values C) The DPL operation fails with a DATATYPE error D) CICS automatically switches the container to BIT mode for packed decimal fields
Answer: B CICS performs code page conversion on all data in CHAR containers during DPL transmission. It has no way to know that specific bytes represent packed decimal rather than character data. The conversion corrupts the binary representation. Always use BIT containers for structures containing binary numeric fields.
Question 4
A program executes GET CONTAINER with an INTO area of 2,000 bytes, but the container holds 5,000 bytes of data. What RESP code is returned?
A) NORMAL — the first 2,000 bytes are retrieved B) LENGERR — the data is truncated and FLENGTH is set to 5,000 C) CONTAINERERR — the container cannot fit in the INTO area D) INVREQ — the operation is invalid for this container size
Answer: B GET CONTAINER returns LENGERR when the INTO area is smaller than the container data. CICS truncates the data to fit the INTO area and sets FLENGTH to the actual container data length (5,000 in this case), allowing the program to detect the truncation.
Question 5
How is a channel created in CICS?
A) EXEC CICS CREATE CHANNEL('name') B) EXEC CICS DEFINE CHANNEL('name') C) Implicitly, when the first container is PUT into it D) By the CICS system programmer via CEDA DEFINE
Answer: C Channels are created implicitly when the first PUT CONTAINER specifies a channel name that doesn't yet exist. There is no explicit CREATE CHANNEL command.
Question 6
Container names in CICS are:
A) Case-insensitive and padded with spaces to 16 characters B) Case-sensitive and compared exactly as specified C) Case-insensitive and truncated to 8 characters D) Case-sensitive but automatically converted to uppercase
Answer: B
Container names are case-sensitive. 'Customer-Data' and 'CUSTOMER-DATA' are different containers. This is a common source of bugs during migration and new development.
Question 7
What is the purpose of the MOVE CONTAINER command?
A) To copy a container from one channel to another, leaving the original in place B) To transfer a container from one channel to another, removing it from the source C) To rename a container within the same channel D) To move container data from working storage to the channel
Answer: B MOVE CONTAINER transfers a container from the source channel to the target channel. The container is removed from the source. The optional AS parameter allows renaming during the move. MOVE is more efficient than GET+PUT because it avoids copying data through working storage.
Question 8
When a CICS program is LINKed with a CHANNEL option, and that program issues LINK to a third program without specifying a CHANNEL:
A) The third program receives no channel B) The third program receives the current channel automatically C) CICS raises a CHANNELERR condition D) The third program receives an empty channel with the same name
Answer: B The current channel is automatically propagated when a LINKed program issues another LINK without specifying its own CHANNEL option. This is the "current channel" propagation behavior.
Question 9
Which GET CONTAINER option avoids copying data into the program's working storage?
A) NODATA B) POINTER C) SET D) REFERENCE
Answer: C GET CONTAINER with SET returns a pointer to the data in CICS-managed storage, avoiding the copy into working storage. This is essential for large containers where the copy overhead or working storage requirements would be problematic.
Question 10
In the dual-interface migration pattern, how does a program detect whether it was invoked with a channel?
A) Check EIBCALEN for a value greater than 32,760 B) EXEC CICS ASSIGN CHANNEL(ws-variable) and check if the variable is non-spaces C) EXEC CICS INQUIRE CHANNEL and check the response code D) Check EIBRCODE for the channel indicator bit
Answer: B EXEC CICS ASSIGN CHANNEL retrieves the current channel name. If the response is NORMAL and the channel name is not spaces, the program was invoked with a channel. Otherwise, check EIBCALEN for a COMMAREA.
Question 11
What standard container does CICS use to pass web service request/response data to a handler program?
A) DFHWS-COMMAREA B) DFHWS-DATA C) DFHWS-PAYLOAD D) DFHWS-REQUEST
Answer: B DFHWS-DATA is the standard container name used by the CICS web service pipeline to pass the business data (SOAP body or REST payload) to the handler program. The program GETs request data from and PUTs response data to this container.
Question 12
Which of the following data items should be stored in a BIT container? (Select all that apply.)
I. A customer name in EBCDIC II. A packed decimal account balance (COMP-3) III. A JPEG image thumbnail IV. A free-text physician note V. A COBOL structure with mixed PIC X and COMP fields
A) II and III only B) II, III, and V C) I, II, III, and V D) All of them
Answer: B BIT containers should be used for binary data that must not undergo code page conversion: packed decimal fields (II), binary image data (III), and mixed structures containing binary numeric fields (V). Character-only data like customer names (I) and free-text notes (IV) can safely use CHAR containers.
Question 13
A channel with 5 containers is passed via DPL. Each container has approximately 200-300 bytes of control block overhead. What is the approximate total control block overhead?
A) 200-300 bytes B) 500-750 bytes C) 1,000-1,500 bytes D) 5,000-7,500 bytes
Answer: C Each container carries approximately 200-300 bytes of control block overhead. With 5 containers: 5 x 200-300 = 1,000-1,500 bytes of overhead. This is negligible for most applications but becomes significant when using hundreds of containers.
Question 14
When designing a channel for a multi-program pipeline, which principle should govern container modification?
A) Each program should update all containers to reflect the current state B) Each program should read what it needs and write only its own output containers C) Only the first and last programs should modify containers D) All intermediate programs should use TS queues instead of containers
Answer: B In the pipeline pattern, each program reads the containers it needs as input and writes its own output containers. Programs should not modify containers created by other programs. This creates a clear data flow, avoids coupling, and makes the pipeline testable at each stage.
Question 15
What is the correct approach when a PUT CONTAINER is issued for a container name that already exists in the channel?
A) CICS raises CONTAINERERR because the container already exists B) CICS appends the new data to the existing container C) CICS replaces the existing container data entirely with the new data D) CICS creates a second container with the same name
Answer: C PUT CONTAINER replaces the existing container data entirely. There is no append operation. If you need to add data to a container, you must GET the existing data, combine it with the new data in working storage, and PUT the combined result.
Question 16
Sandra's team at Federal Benefits is migrating a COMMAREA-based program to channels. The COMMAREA uses REDEFINES to support three record types. What is the recommended channel migration strategy?
A) Create a single container with the same REDEFINES structure B) Create separate containers for each record type and check which container is present C) Create three channels, one for each record type D) Keep the COMMAREA for this program since REDEFINES is not supported with containers
Answer: B The recommended approach is to create separate containers for each record type. The called program checks which containers are present to determine the operation type. This eliminates the REDEFINES pattern entirely, improving clarity and maintainability.
Question 17
Which of the following is NOT a valid reason to choose channels over COMMAREA?
A) The data exceeds 32,760 bytes B) The program serves as a web services back-end C) The data is a fixed 500-byte structure passed between two local programs D) Cross-region DPL requires automatic code page conversion
Answer: C A fixed 500-byte structure between two local programs is well within COMMAREA's capabilities. Channels add no benefit here and introduce unnecessary complexity. The migration decision framework recommends COMMAREA for small, fixed-format, local-only data exchanges.
Question 18
What is the FROMCCSID option on PUT CONTAINER used for?
A) To specify the CCSID of the target region in a DPL operation B) To specify the coded character set identifier of the source data being PUT into a CHAR container C) To force conversion of BIT container data during transmission D) To set the default CCSID for all subsequent container operations
Answer: B FROMCCSID specifies the CCSID of the source data being written to a CHAR container. This information is stored with the container and used by CICS when conversion is needed — either during a GET with INTOCCSID or during DPL transmission to a region with a different CCSID.
Question 19
A program uses STARTBROWSE CONTAINER, GETNEXT CONTAINER, and ENDBROWSE CONTAINER to enumerate containers. When does the GETNEXT loop terminate?
A) When GETNEXT returns DFHRESP(CONTAINERERR) B) When GETNEXT returns DFHRESP(END) C) When GETNEXT returns DFHRESP(ENDDATA) D) When the browse token becomes zero
Answer: B The GETNEXT CONTAINER loop terminates when CICS returns DFHRESP(END), indicating there are no more containers to browse in the channel.
Question 20
In the HA Banking system, the loan origination flow currently uses COMMAREA plus TS queue overflow and needs to handle up to 150KB of data. Which migration approach has the lowest risk?
A) Rewrite all five loan programs simultaneously to use a single large container B) Implement wrapper programs that convert between channels and the existing COMMAREA/TS queue interface, then migrate individual programs incrementally C) Replace the TS queue overflow with a larger COMMAREA by splitting the transaction into multiple smaller transactions D) Switch to MQ Series for all inter-program communication
Answer: B The wrapper/coexistence strategy has the lowest risk. Wrapper programs provide a channel interface to external callers while preserving the existing COMMAREA-based programs internally. Individual programs are then migrated incrementally, with the wrappers providing a safety net. This avoids the big-bang risk of simultaneous rewrite.