Sivasankaria
New User
Joined: 23 Jul 2009 Posts: 1 Location: Chennai
|
|
|
|
Hi
I am currently working on establishing communication between VB.net program as client and IMS Connect as Listener.
Given below is the client program in VB.net
Code: |
Imports System.IO
Imports System.Net.Sockets
Module Module1
Sub Main()
Try
Console.WriteLine("Connecting to 172.16.11.11")
Dim serverListener As New TcpClient("172.16.11.11", 999)
Dim readStream As Stream = serverListener.GetStream
serverListener.SendBufferSize = 256
Console.WriteLine("Input Lines:")
Dim str As String = "105800*SAMPL1*00CLIENT000 IMS1 170IVTNOAN960C1040"
While True
Dim sendBuff As Byte() = System.Text.Encoding.ASCII.GetBytes(str)
readStream.Write(sendBuff, 0, sendBuff.Length)
If str.StartsWith(".") Then
GoTo Done
End If
str = Console.ReadLine()
End While
Done: Console.WriteLine("Done")
Catch exp As Exception
Console.WriteLine("Exception: " + exp.ToString())
End Try
End Sub
End Module |
When i execute this program, i am getting few errors saying that
HWSP1415E TCP/IP SOCKET FUNCTION CALL FAILED; F=READ , R=-1, E=1121, M=SDRC, ID=DELDUMMY, IPv4=172.20.34.35
HWSP1415E TCP/IP SOCKET FUNCTION CALL FAILED; F=READ , R=-1, E=1121, M=SDRC, ID=DELDUMMY, IPv4=172.20.34.35
HWSP1435E SOCKET CLOSED; REQUEST MESSAGE INCOMPLETE; M=SDRC
HWSP1445E UNKNOWN EXIT NAME SPECIFIED IN MESSAGE PREFIX; MSGID= (&< /AMPL1*00, M=SDRC
I guess that the reason for this error is input message sent from client porgram to IMS Connect is not in the format accepted by IMS Connect.
Could anyone provide me a sample client program in VB.net which can succefully communicate with IMS Connect? |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
When posting code, jcl, data, etc it is best to use the "Code" tag for readability.
Is there maybe a sample in the IMS Connect documentation? |
|