Business state data management in nonpersistent service flows
In a simple, nonpersistent service flow, the Link3270 server adapter business state data is stored, retrieved, and deleted in a multiple item CICS® temporary storage queue (TSQ).
The TSQ has up to two items for each allocated Link3270 bridge facility:
- The first item contains the Link3270 facility business state information used in Link3270 server adapter processing.
- The second item contains any Link3270 facility business state text information used in Link3270 server adapter processing as the result of a BMS SEND TEXT command or SEND command containing textual information.
The TSQ is used to manage the business state data of facilities and ownership of facilities left allocated. Normally, the TSQ stores the last bridge vector received (maximum 32 000 bytes ADS , text, or 3270 datastream data) from the defined target CICS application transaction as modeled in the service 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.
Based on the setting of the deallocate facility indicator in the Link3270 server adapter and the completion status of that adapter, the facility might remain allocated and its associated business state retained when the adapter server completes its processing. If so, the Link3270 server adapter business state TSQ is written containing the allocated facility business state information for that facility owner. The facility and its associated business state is available for the owner of that facility in subsequent request processing. The owner is the signed-on user ID to the local CICS region, as determined by an EXEC CICS ASSIGN command.
When Link3270 server adapter processing is complete, if the Link3270 bridge facility is left allocated with its associated facility business state data stored in the facility business state TSQ, the Link3270 facility state token is returned to the service requester in the reply message in the DFHMAH header structure field, DFHMAH-STATETOKEN, for use in subsequent request processing. 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 and a Link3270 server adapter is invoked, a new Link3270 facility is allocated and used in Link3270 server adapter processing.
An allocated Link3270 facility might be deallocated and its associated facility business state data deleted when Link3270 server adapter processing is complete, based on the setting of the deallocate facility indicator, MP-BR-DEALLOCATE-IND, for that Link3270 server adapter and the completion status of that Link3270 server adapter.
In addition, Link3270 facilities and their associated business state data might be deallocated and deleted, respectively, by the system cleanup tasks. See Facility state cleanup processing for a description of how this cleanup is performed.
Also, as a normal end-of-day processing strategy, the service requester might invoke a service flow to locate any allocated facility, deallocate the facility, and delete its associated facility business state data. This flow must run for each allocated Link3270 facility state token by each service requester invoking service flows.