STSN handler

This program handles STSN processing for the FEPI sample application programs.

The CZQS transaction is started by FEPI when a request for message resynchronization (set and test sequence number, STSN) or a start data traffic indication is received from a back-end IMS system.

The conversation passed by FEPI must be accessed so that FEPI knows that the event is being handled. The processing required depends on the STSN status, which is obtained using FEPI EXTRACT STSN.

For STSNSTATUS=NOSTSN, the transaction was started because start data traffic arrived. A DR1 normal response must be sent.

For STSNSTATUS=STSNSET, a positive STSN response must be sent.

For STSNSTATUS=STSNTEST, processing would typically involve comparing saved sequence numbers with those received from the back-end IMS system to determine what response to send. Communications and connections in IMS product documentation gives advice on the appropriate action.

After the processing, the response is sent using FEPI ISSUE. A report is written to a TS queue named SESSION, which can be browsed using CEBR. The general format of the TS queue records is:
date time CZQS STSN processing completed
          Target......TGTNAME      Node........NODENAME
          Seqnumin....nnnn         Seqnumout...nnnn
          STSN status.XXXXXXX      Response....XXXXXXXX

Program logic

   Main procedure:
     RETRIEVE start data
     Access conversation using FEPI ALLOCATE with PASSCONVID
     Get STSN status using FEPI EXTRACT STSN
     Call NOSTSN, STSNSET, or STSNTEST
         according to STSN status
     Send response using FEPI ISSUE CONTROL
     Write event details to TS queue
     Free conversation, keeping session
     RETURN
   NOSTSN routine:
     Build DR1 normal response
   STSNSET routine:
     Build STSN positive response
   STSNTEST routine:
     Handle as required
     Build required response