REOverride를 사용하여 원격 환경 지정 방법
프로그래밍 방식으로 RE를 지정하기 위해 애플리케이션은 관리되는 컨텍스트 항목을 사용합니다. 컨텍스트 속성은 디자이너 내에서 메서드에서 true로 설정해야 합니다.
다음 Visual Basic 코드는 애플리케이션 내에서 RE를 가상으로 만드는 예제를 보여줍니다.
' 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
다음 Visual Basic 코드는 MSHMIRS를 사용하는 HTTP의 예를 보여 줍니다.
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
다음 Visual Basic 코드는 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
다음 Visual Basic 코드는 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
다음 Visual Basic 코드는 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
다음 Visual Basic 코드는 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
다음 Visual Basic 코드는 ELM Link의 예를 보여줍니다.
Dim TIContext As New ClientContext
Dim DynamicRE As ELMLinkRemoteEnvironment
DynamicRE = RemoteEnvironmentClassFactory.MakeRemoteEnvironment(DynamicRemoteEnvironmentTypes.ELMLink, "MyRE")
DynamicRE.IPAddress = SystemAddress
DynamicRE.TCPPorts = PortNumber
TIContext.DynamicRE = DynamicRE
다음 Visual Basic 코드는 보안이 있는 TRM 링크의 예를 보여 있습니다.
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"
다음 Visual Basic 코드는 보안이 있는 TRM 사용자 데이터의 예를 보여 있습니다.
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
다음 Visual Basic 코드는 보안 없이 IMS Connect, 종료 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
다음 Visual Basic 코드는 보안, 종료 HWSIMSO1 사용하여 IMS Connect의 예를 보여 줍니다.
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
다음 Visual Basic 코드는 보안 및 라이브러리 이름을 사용하는 OS 400의 예를 보여 있습니다.
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