Cómo usar REOverride para especificar un entorno remoto
Para especificar mediante programación un RE, la aplicación usa la entrada de contexto administrada. La propiedad de contexto debe establecerse en true en el método desde el diseñador.
En el siguiente código de Visual Basic se muestra un ejemplo que crea virtualmente un RE dentro de la aplicación.
' You must set the following references in your project:
' Microsoft.HostIntegration.TI.ClientContext.dll
' Microsoft.HostIntegration.TI.Globals.dll
Imports Microsoft.HostIntegration.TI
Dim TIContext As New ClientContext
Dim DynamicRE As ELMLinkRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.ELMLink, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.TCPPorts = PortNumber
TIContext.DynamicRE = DynamicRE
Obj.Method1 parm1, parm2, parm3, TIContext
El siguiente código de Visual Basic muestra un ejemplo de HTTP mediante MSHMIRS.
Dim DynamicRE As HTTPLinkRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.HttpLink, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.HttpPort = PortNumber
DynamicRE.MirrorProgramName = "MSHMIRS"
DynamicRE.AliasTransactionId = "CWBA"
TIContext.DynamicRE = DynamicRE
El siguiente código de Visual Basic muestra un ejemplo de datos de usuario HTTP.
Dim TIContext As New ClientContext
Dim DynamicRE As HTTPUserDataRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.HttpUserData, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.HttpPort = PortNumber
DynamicRE.AliasTransactionId = "CWBA"
TIContext.DynamicRE = DynamicRE
El siguiente código de Visual Basic muestra un ejemplo de vínculo CICS.
Dim TIContext As New ClientContext
Dim DynamicRE As SNALinkRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.SNALink, "MyRE")
DynamicRE.LocalLUName = LocalLUName
DynamicRE.RemoteLUName = RemoteLUName
DynamicRE.ModeName = Mode
TIContext.DynamicRE = DynamicRE
El siguiente código de Visual Basic muestra un ejemplo de datos de usuario de CICS LU6.2.
Dim TIContext As New ClientContext
Dim DynamicRE As SNAUserDataRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.SNAUserData, "MyRE")
DynamicRE.LocalLUName = LocalLUName
DynamicRE.RemoteLUName = RemoteLUName
DynamicRE.ModeName = Mode
TIContext.DynamicRE = DynamicRE
El siguiente código de Visual Basic muestra un ejemplo de IMS LU 6.2.
Dim TIContext As New ClientContext
Dim DynamicRE As SNAUserDataRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.IMSLU62, "MyRE")
DynamicRE.LocalLUName = LocalLUName
DynamicRE.RemoteLUName = RemoteLUName
DynamicRE.ModeName = Mode
TIContext.DynamicRE = DynamicRE
En el siguiente código de Visual Basic se muestra un ejemplo de vínculo de ELM.
Dim TIContext As New ClientContext
Dim DynamicRE As ELMLinkRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.ELMLink, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.TCPPorts = PortNumber
TIContext.DynamicRE = DynamicRE
El siguiente código de Visual Basic muestra un ejemplo de vínculo de TRM con seguridad.
Dim TIContext As New ClientContext
Dim DynamicRE As TRMLinkRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.TRMLink, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.TCPPorts = PortNumber
DynamicRE.Security = RemoteEnvironmentSecurity.User
TIContext.DynamicRE = DynamicRE
TIContext.User = "UserId"
TIContext.Password = "Password"
El siguiente código de Visual Basic muestra un ejemplo de datos de usuario de TRM con Seguridad.
Dim TIContext As New ClientContext
Dim DynamicRE As TRMUserDataRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.TRMUserData, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.TCPPorts = PortNumber
DynamicRE.Security = RemoteEnvironmentSecurity.User
TIContext.User = "UserId"
TIContext.Password = "Password"
TIContext.TransactionId = "CICS Transaction name"
TIContext.DynamicRE = DynamicRE
El siguiente código de Visual Basic muestra un ejemplo de IMS Connect sin seguridad, salir HWSIMSO0.
Dim TIContext As New ClientContext
Dim DynamicRE As IMSConnectRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.IMSConnect, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.TCPPorts = PortNumber
DynamicRE.ItocExitName = "*IRMREQ*"
DynamicRE.OtmaSystemId = "IMS system ID"
TIContext.DynamicRE = DynamicRE
En el siguiente código de Visual Basic se muestra un ejemplo de conexión de IMS con seguridad, salida HWSIMSO1.
Dim TIContext As New ClientContext
Dim DynamicRE As IMSConnectRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.IMSConnect, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.TCPPorts = PortNumber
DynamicRE.ItocExitName = "*IRMRE1*"
DynamicRE.OtmaSystemId = "IMS system ID"
DynamicRE.Security = RemoteEnvironmentSecurity.Off Or RemoteEnvironmentSecurity.ImsHWS01SecurityExit
TIContext.DynamicRE = DynamicRE
El siguiente código de Visual Basic muestra un ejemplo del sistema operativo 400 con seguridad y nombre de biblioteca.
Dim TIContext As New ClientContext
Dim DynamicRE As DPCRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.DistributedProgramCall, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.TCPPorts = PortNumber
DynamicRE.Security = RemoteEnvironmentSecurity.User
TIContext.User = "UserID"
TIContext.Password = "Password"
TIContext.LibraryName = "Library Name"
TIContext.DynamicRE = DynamicRE