IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Communication between VB.Net Client & IMS Connect via TC


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sivasankaria

New User


Joined: 23 Jul 2009
Posts: 1
Location: Chennai

PostPosted: Tue Aug 04, 2009 2:07 pm
Reply with quote

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?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 04, 2009 7:28 pm
Reply with quote

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?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Connect Direct 6.3 for Z/OS All Other Mainframe Topics 20
No new posts Getting TWA in CICS program while con... CICS 14
No new posts Unable to connect FTP over TLS from z... All Other Mainframe Topics 5
No new posts New style in recruiters' communication General Talk & Fun Stuff 3
No new posts Connect:Direct Add yesterday date in ... All Other Mainframe Topics 3
Search our Forums:

Back to Top