Many CICS® server programs use Basic Mapping Support (BMS) to implement their 3270 screen designs.
The server programs can then use symbolic names for the individual screen maps and for the 3270 fields on those maps. If the BMS source files are available, they can be copied to the Client daemon development environment and used in the implementation of a Visual Basic EPI program.
The CICS BMS Conversion Utility (CICSBMSC.EXE) that is provided produces a Visual Basic definitions file (a .BAS file) from the source BMS file (.BMS file). This definitions file can then be included in a Visual Basic program, and the same symbolic names used to identify maps and their fields in the server program can be used in the client program with the EPI Map COM class.
The /B option should be specified when running the conversion utility to produce Visual Basic definitions:
CICSBMSC /B <filename>.BMS
Dim EPI As CclOEPI
Dim Terminal As CclOTerminal
Dim Session As CclOSession
Dim Screen As CclOScreen
Dim Map as CclOMap
Dim Field As CclOField
Sub EPIConnect_Click()
'Create Ccl.EPI first to initialize EPI
Set EPI = New CclOEPI
'Create a terminal object and connect to CICS
Set Terminal = New CclOTerminal
Terminal.Connect "CICSNAME","",""
'Create a session object (defaults to synchronous)
Set Session = New CclOSession
End Sub
Sub EPIRunBMS_Click()
Terminal.Start Session, "EPIC", ""
Set Screen = Terminal.Screen
Set Map = New CclOMap
If (Map.Validate(Screen,MAPINQ1)) Then
Set Field = Map.FieldByName(MAPINQ1_PRODNAM)
List1.AddItem Field.Text
Set Field = Map.FieldByName(MAPINQ1_TIME)
List1.AddItem Field.Text
Else
List1.Text= "Unexpected screen data"
End If
A more complex application would then enter data into selected fields, set the required AID key (Enter, Clear, PF or PA key) and navigate through further screens as required. The client application can mix the use of the Screen COM class (and its FieldByIndex and FieldByPosition methods) with the use of the Map COM class.