Deferred synchronous reply handling

In the examples in section Linking to a CICS server program using Visual Basic a Flow object was used with the default synchronization type of cclSync. When this Flow object was used as the first parameter on Connect.Link, a synchronous link call was made to CICS®. The Visual Basic program was then blocked until the reply was received from CICS. When the link call returned the reply from CICS was immediately available in the Buffer object.

To make a deferred synchronous call you use the SetSyncType method on the Flow object to set the Flow to cclDSync. When this Flow object is used on a Connect.Link call, the ECI call is made to CICS, but control returns immediately to the Visual Basic Program, and the reply from CICS must be retrieved later using the Poll method on the Flow object:
  Sub ECIDsync_Click()
      Set Connect = New CclOConn
      Set Flow = New CclOFlow
      Set Buffer = New CclOBuf
      Connect.Details "CICSNAME", "sysad", "sysad"
      Flow.SetSyncType cclDSync
      Buffer.SetString "Hello"
      Connect.Link Flow, "ECIWTO", Buffer, UOW
  End Sub
The call to CICS is now in progress. At a later stage (in response to a user action, or perhaps when the Visual Basic program has completed some other task) the Poll method is used on the Flow object to collect the reply from CICS. Note that the Poll method requires a Buffer object as parameter if reply data is expected from CICS
  Sub ECIReply_Click()
      If Flow.Poll(Buffer) Then
          Text1.Text = Buffer.String
      Else
          Text1.Text = "No reply from CICS yet"
      End If
  End Sub

Information Information

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//progde/cclaovc2.html