When you have connected a CclOTerminal object to the required CICS® server you can use the Terminal, Session, Screen and Field COM classes to start a transaction on CICS and navigate through 3270 panels, accessing 3270 fields as required by the application.
Sub EPIStart_Click()
'Start CESN transaction
Terminal.Start Session, "CESN", ""
'Get the screen object
Set Screen = Terminal.Screen
'Output the text from some 3270 fields
Set Field = Screen.FieldByIndex(5)
List1.AddItem Field.Text
Set Field = Screen.FieldByIndex(6)
List1.AddItem Field.Text
The CESN transaction is waiting for input from the user, the program could enter text into some fields and continue the transaction, in this example we simply end the transaction by sending PF3 to CICS.
'Send PF3 back to CICS to end CESN
Screen.SetAID cclPF3
Terminal.Send Session
'Output the text from a 3270 field
Set Field = Screen.FieldByIndex(1)
List1.AddItem Field.Text
End Sub
Sub EPIDone_Click()
Terminal.Disconnect
'Delete the EPI COM objects
Set Field = Nothing
Set Screen = Nothing
Set Session = Nothing
Set Terminal = Nothing
Set EPI = Nothing
End Sub