VBScript is again very similar to Visual Basic but differs in how you create the objects.
You do not have to Dim your variables but it is good coding practice to do so. As with Visual basic COM objects do not support DBCS fields in the 3270 data streams. To create objects you must use the CreateObject function, for example:
Sub EPIConnect_Click()
' Create Ccl.EPI first to initialise EPI
Set EPI = CreateObject("Ccl.EPI")
' Create a terminal object and connect to CICS
Set Terminal = CreateObject("Ccl.Terminal")
Terminal.Connect "CICSNAME","",""
' Create a session object (defaults to synchronous)
Set Session = CreateObject("Ccl.Session")
End Sub
In a similar manner, to create a Map object you issue
Set Map = CreateObject("Ccl.MAP")
Screen objects and Fields Objects are created for you.