Business state data management in aggregate connectors and single connector (persistent patterns)

For Adapter services of the aggregate connector pattern, both persistent and nonpersistent, and for Adapter services of the single connector persistent pattern, CICS® Service Flow Runtime Link3270 server adapter business state data is stored, retrieved and deleted in a CICS VSAM file (DFHMAL2F).

See Deployment patterns for further information regarding aggregate connector patterns and single connector - persistent patterns.

The state file DFHMAL2F is mapped by copybook DFHMAR2S in the libraryhqual.SCIZMAC. There are at most two VSAM records for each allocated Link3270 bridge facility. There may be no VSAM records written to store facility business state data if the Link3270 server adapter processing does not require it.

See Link3270 node properties for information on the deallocate facility indicator, MP-BR-DEALLOCATE-IND, and other Link3270 server adapter properties.

A VSAM file is used to store, retrieve and delete Link3270 facility business state information when the deployment pattern is of the aggregate or complex type or when recoverability is a requirement. There can be at most two VSAM records written for each allocated bridge facility as follows:

The VSAM file is used to manage the business state data of facilities and ownership of facilities left allocated. Normally, this file is used to store the last bridge vector received (max. 32000 bytes ADS, text or 3270 data-stream data) from the defined target CICS application transaction as modeled in the sequence flow. The vector data is used in subsequent Link3270 server adapter processing to determine the allocated facility business state, for example, the last CICS transaction run, the last BMS SEND MAP Application Data Structure (ADS), the last BMS mapset and map names and so forth.

Based upon the setting of the deallocate facility indicator, in the Link3270 server adapter and the execution completion status of that adapter, the facility used may remain allocated and its associated business state retained upon execution completion. If so, the CICS Service Flow Runtime Link3270 Server Adapter Business State file record is written containing the following:

The facility and it's associated business state is available for subsequent use by the owner of that facility in another task.

The Link3270 bridge facility token is also referred to as the Link3270 facility state token.
Note: Userid is the signed-on user id to the local CICS region as determined by an EXEC CICS ASSIGN command, see the CICS Application Programming Reference for further information.

If when Link3270 server adapter processing is complete the Link3270 bridge facility is left allocated with it's associated facility business state data stored in the facility business state file (DFHMAL2F), the Link3270 facility state token is returned to the service requestor/client in the outbound reply message in the DFHMAH header structure field, DFHMAH-STATETOKEN, for use in subsequent request processing if desired. See DFHMAH header structure for further information on the meaning and use of DFHMAH header structure field, DFHMAH-STATETOKEN.

If a Link3270 facility state token is left blank in the request message header structure, DFHMAH, and a Link3270 server adapter is invoked, a new Link3270 facility is allocated and used in Link3270 server adapter processing.

As stated, an allocated Link3270 facility may be de-allocated and it's associated facility business state data deleted when Link3270 server adapter processing is complete based upon the setting of the deallocate facility indicator, MP-BR-DEALLOCATE-IND, for that Link3270 server adapter and the execution completion status of that Link3270 server adapter.

In addition, Link3270 facilities and their associated business state data may be de-allocated and deleted, respectively, by the system cleanup tasks. See Facility state cleanup processing in the CICS Service Flow Runtime for a description of how the runtime environment performs facility business state VSAM file cleanup.

Also, as a normal end of day processing strategy, the service requestor could invoke a modeled flow to locate any allocated facility, deallocate the facility and delete its associated facility business state data. This flow would need to be run for each allocated Link3270 facility state token by each service requestor invoking runtime services.